Jump to content

xXGhostXx

Members
  • Posts

    257
  • Joined

  • Last visited

Everything posted by xXGhostXx

  1. Not work ! I want table for open the gui panel in my position !
  2. Hi I want table for when player come to my positions show the chat box ! like this : tables { {x,y,z}, {x,y,z} }
  3. bro you can make example for this function ?
  4. Hi . I making ban system and i have a problem for make ban time ! i use mySQL ! and i created banBy - banReason just i cant make ban time ! like : /aban <Name> <Time> <Reason> Whats your idea for make ban time ? i want admin press day number and player ban from the server when player ban time is finished player can go to server
  5. Hello . Whats function for on client dx draw image click ? like this : onClientGuiClick for gui
  6. Fixed, but doctor is send request for me but i cant accept request
  7. Hi everyone . What is problem ? I want doctor use /heal and send request to player, player use /aheal and accept heal and set element health to 100 but if not request say "You have no pending request." Please fix it ! function darmanKardan (thePlayer, command, player) local taraf = getPlayerFromName(player) if player then setElementData(taraf,"healrequest", pending) outputChatBox("#00ff00The doctor is willing to heal you. Do you accept?", taraf, 255, 255, 255, true) else outputChatBox("#ff0000Syntax: /heal <Name>", thePlayer, 255, 255, 255, true) end end addCommandHandler("heal", darmanKardan) function acceptHeal (thePlayer, command) local requestStatus = getElementData(thePlayer, "healrequest") if (requestStatus = "pending") then setElementData(player,"healrequest", unpending) setElementHealth(player, 100) outputChatBox("#00ff00You have been healed by the doctor.", thePlayer, 255, 255, 255, true) else outputChatBox("#ff0000[Error]: #ffffffYou have no pending request.", thePlayer, 255, 255, 255, true) end end addCommandHandler("aheal", acceptHeal)
  8. Thanks men ! Do you have skype ?
  9. I added sound for open box ! But sound played for all players ! How to add sound for the Player ? Server : function bazKardanBox (thePlayer, command) local account = getPlayerAccount(thePlayer) local box = getAccountData(account, "pBox") local jayeze = math.random(50000,300000) if ( box and box > 0 ) then triggerClientEvent("sedabox", root) givePlayerMoney(thePlayer, jayeze) setAccountData( account,"pBox", box-1) outputChatBox("#FF00FF[Pro-Box]: #ffffff"..getPlayerName(thePlayer).." Az Box Mablagh #FF00FF$"..jayeze.." #ffffffBe Dast Avord!", root, 255, 255, 255, true) else if box == 0 then outputChatBox( "#ff0000[Error]: #ffffffShoma Box Nadarid!", thePlayer, 255, 0, 0,true ) else setAccountData( account,"pBox", 0) outputChatBox( "#ff0000[Error]: #ffffffShoma Box Nadarid!", thePlayer, 255, 0, 0,true ) end end end addCommandHandler("openbox", bazKardanBox) Client : addEvent("sedabox",true) addEventHandler("sedabox",getRootElement(),function() local sound = playSound("Data/box.wav") setSoundVolume(sound, 5.0) end)
  10. I deleted chat box line 14, no problem ?
  11. Which take output for simplified code ? Line 11 or 14 ?
  12. Why the chatBox line 11 are repeated twice?
  13. Thanks !!!!!!!!! I LOVE YOU What is problem ?! function bazKardanBox (thePlayer, command) local account = getPlayerAccount(thePlayer) local box = getAccountData(account, "tedad") local jayeze = math.random(100000,600000) if ( getAccountData(account, "tedad") == true ) then givePlayerMoney(thePlayer, jayeze) setAccountData( account,"tedad", box-tedad) outputChatBox("#FF00FF[Pro-Box]: #ffffff"..getPlayerName(thePlayer).." Az Box Mablagh #FF00FF$"..jayeze.." #ffffffBe Dast Avord!", root, 255, 255, 255, true) else outputChatBox( "#ff0000[Error]: #ffffffShoma Box Nadarid!", thePlayer, 255, 0, 0,true ) end end addCommandHandler("openbox", bazKardanBox) I want when use /openbox take 1 box from account data and give Player money. and if not box the player does not give the money
  14. oh ! yes ! line 7 What is problem ?
  15. I said on line 8 Check yourself please
  16. function boxMan (thePlayer, command, tedad) local tedad = tonumber(tedad) local account = getPlayerAccount(thePlayer) local box = getAccountData(account, "tedad") outputChatBox("#00ff00Shoma #ffffff"..box.." #00ff00Box Darid!", thePlayer, 255, 255, 255, true) end addCommandHandler("mybox", boxMan) line : 8 Test yourself
  17. Debug error : unexpected symbol near '
  18. Debug error : attempt to perform arithmetic on local 'box' (a boolean value)
  19. Hello everyone. I make box system and for save number box i used set account data. Command : /givebox <PlayerName> <Number> function dadanBox (thePlayer, command, player, tedad) local taraf = getPlayerFromName (player) local tedad = tonumber(tedad) local account = getPlayerAccount(taraf) local box = getAccountData(account, tedad) local esmAdmin = getPlayerName(thePlayer) local esmesh = getPlayerName(taraf) if taraf then if tedad then setAccountData(taraf, account, box+tedad) outputChatBox("#00ff00[Done]: #ffffffShoma Be #00ff00"..esmesh.." #ffffffTedad "..tedad.." Box Dadid!", thePlayer, 255, 255, 255, true) outputChatBox("#ffff00[Info]: #ffffffAdmin #ffff00"..esmAdmin.." #ffffffBe Shoma #ffff00"..tedad.." #ffffffBox Dad!", taraf, 255, 255, 255, true) else outputChatBox("#ff0000[Error]: #ffffffTedad Box Ra Vared Konid!", thePlayer, 255, 255, 255, true) end else outputChatBox("#00ff00Bezan: /givebox <PartOfName> <Tedad>", thePlayer, 255, 255, 255, true) end end addCommandHandler("givebox", dadanBox) And for show number box I used get account data. function boxMan (thePlayer, command, tedad) local tedad = tonumber(tedad) local account = getPlayerAccount(thePlayer) local box = getAccountData(account, tedad) outputChatBox("#00ff00Shoma #ffffff"..box.." #00ff00Box Darid!", thePlayer, 255, 255, 255, true) end addCommandHandler("mybox", boxMan) What is problem ?! Please answer me. @iMr.WiFi..! @Dimos7
×
×
  • Create New...