Jump to content

gokalpfirat

Members
  • Posts

    314
  • Joined

  • Last visited

Everything posted by gokalpfirat

  1. kufurtablo = {} function kufur:ekle( kufur ) table.insert( kufurtablo, kufur ) end function playerChat ( message, messageType ) if messageType == 0 then for k,v in ipairs(kufurtablo) do if string.find((string.gsub)message,v) then cancelEvent() banPlayer ( source, Serial = true, reason = "Bad word", seconds = 12000 ) outputChatBox ( getPlayerName(source).." has banned 2 minutes for saying bad word..", getRootElement(), 0, 255, 0, true ) end end end end This is my code and this is my another .lua file. function onResourceStart(res) kufur:ekle ("fuck") end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),onResourceStart) I havent got error when i debug it but it doesnt works.
  2. gokalpfirat

    Wanted

    I think this will working and you defined WantedLevel to local Wanted but you should defined it local star then it works.
  3. gokalpfirat

    Wanted

    # function updatestars() for k, v in ipairs(getElementsByType('player')) do local star = getPlayerWantedLevel(v) setElementData(v,"Wanted",star ) end end setTimer(updatestars, 1000000, 0) Use this.
  4. You want pickup txd s?
  5. Basic and usefull resource. Thnx
  6. Can you give some details i think nobody understand what you are saying:)
  7. text = "gta" outputChatBox ( #text, getRootElement(), 0, 255, 0 ) I test it and works:)
  8. gta = "gta" outputChatBox ( #gta, getRootElement(), 0, 255, 0, true ) I dont test it but it can work.
  9. Not working. There arent any text at chatbox when i say /tkm rock
  10. function taskagitmakas ( player, command, tkm ) local rand = math.random(0,2) local playing = nil if tkm == 'rock' then playing = 'rock' elseif tkm == 'paper' then playing = 'paper' elseif tkm == 'scissors' then playing = 'scissors' end if getElementData(player, 'canPlay') then if rand == 0 and tkm == 'rock' then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played "..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played rock !" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Draw!" ,getRootElement(),0,255,0,true) end if rand == 0 and tkm == 'scissors' then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played "..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played rock!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner"..getPlayerName(player) ,getRootElement(),0,255,0,true) end if rand == 0 and tkm == 'paper' then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played "..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played rock!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner CPU!" ,getRootElement(),0,255,0,true) end if rand == 1 and tkm == 'rock' then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played "..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played paper!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner CPU!" ,getRootElement(),0,255,0,true) end if rand == 1 and tkm == 'scissors' then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played "..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played paper!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner"..getPlayerName(player), getRootElement(),0,255,0,true) end if rand == 1 and tkm == 'paper' then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played "..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played paper!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Draw!" ,getRootElement(),0,255,0,true) end if rand == 2 and tkm == 'rock' then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played "..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner"..getPlayerName(player), getRootElement(),0,255,0,true) end if rand == 2 and tkm == 'scissors' then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played "..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Draw" ,getRootElement(),0,255,0,true) end if rand == 2 and tkm == 'paper' then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played "..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner CPU!" ,getRootElement(),0,255,0,true) end end setElementData(player, 'canPlay', false) setTimer(setElementData, 60000, 1, player, 'canPlay', true) end addCommandHandler ( "tkm", taskagitmakas ) function onChat (message, messageType) if not (getElementData(player, 'canPlay')) and message = string.find "/tkm" then outputChatBox("#00cc00Winner CPU!" ,source,0,255,0,true) end addEventHandler ( "onPlayerChat", getRootElement(), onChat ) I get error at line 79 and it doesnt works.
  11. İt works but i want like when you use tkm command then timer starts when you want to use command in timer it says "You can play only once time in a minute" Edit: Give error Bad argument@ "addCommandHandler"
  12. It is working thnx bro. How can i use tkm command only once in a minute.
  13. Now only says outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true)
  14. Sorry for flooding im press quate not modify sorry.
  15. Now no errors but when im saying /tkm rock it doesnt works why?
  16. Line 14 local playing (nil value) and when i say /tkm tas it doesnt works
  17. # function taskagitmakas ( player, command, tkm ) local rand = math.random(0,2) local playing = nil if tkm == rock then local playing = rock elseif tkm == paper then local playing = paper elseif tkm == scissors then local playing = scissors end if rand == 0 and tkm == rock then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." has played#00cc00"..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played rock !" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Draw!" ,getRootElement(),0,255,0,true) end if rand == 0 and tkm == scissors then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played rock!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner"..getPlayerName(player) ,getRootElement(),0,255,0,true) end if rand == 0 and tkm == paper then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played rock!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner CPU!" ,getRootElement(),0,255,0,true) end if rand == 1 and tkm == rock then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played paper!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner CPU!" ,getRootElement(),0,255,0,true) end if rand == 1 and tkm == scissors then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played paper!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner"..getPlayerName(player), getRootElement(),0,255,0,true) end if rand == 1 and tkm == paper then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played paper!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Draw!" ,getRootElement(),0,255,0,true) end if rand == 2 and tkm == rock then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner"..getPlayerName(player), getRootElement(),0,255,0,true) end if rand == 2 and tkm == scissors then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Draw" ,getRootElement(),0,255,0,true) end if rand == 2 and tkm == paper then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..playing.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner CPU!" ,getRootElement(),0,255,0,true) end end addCommandHandler ( "tkm", taskagitmakas ) Look at now gives error at line 14 and 33
  18. line 14 local oynanan (nil value) line 33 local oynanan (nil value)
  19. function taskagitmakas ( player, command, tkm ) local rand = math.random(0,2) local playing = nil if tkm == rock then local playing = rock elseif tkm == paper then local playing = paper elseif tkm == scissors then local playing = scissors end if rand == 0 and tkm == rock then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." has played#00cc00"..oynanan.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played rock !" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Draw!" ,getRootElement(),0,255,0,true) end if rand == 0 and tkm == scissors then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..oynanan.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played rock!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner"..getPlayerName(player) ,getRootElement(),0,255,0,true) end if rand == 0 and tkm == paper then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..oynanan.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played rock!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner CPU!" ,getRootElement(),0,255,0,true) end if rand == 1 and tkm == rock then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..oynanan.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played paper!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner CPU!" ,getRootElement(),0,255,0,true) end if rand == 1 and tkm == scissors then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..oynanan.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played paper!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner"..getPlayerName(player), getRootElement(),0,255,0,true) end if rand == 1 and tkm == paper then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..oynanan.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played paper!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Draw!" ,getRootElement(),0,255,0,true) end if rand == 2 and tkm == rock then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..oynanan.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner"..getPlayerName(player), getRootElement(),0,255,0,true) end if rand == 2 and tkm == scissors then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..oynanan.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Draw" ,getRootElement(),0,255,0,true) end if rand == 2 and tkm == paper then outputChatBox("Rock,Paper,Scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#cc0000"..getPlayerName(player).." #00cc00has played"..oynanan.."!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00CPU played scissors!" ,getRootElement(),0,255,0,true) outputChatBox("#00cc00Winner CPU!" ,getRootElement(),0,255,0,true) end end addCommandHandler ( "tkm", taskagitmakas ) I have got a lot of errors when i debug it. Like line 14 and line 33.
  20. Thanks but now im getting unexpected symbol near ',' outputChatBox("#00cc00Winner"..getPlayerName(player).. , getRootElement(),0,255,0,true)
  21. function taskagitmakas ( player, commandName, tkm ) local rand = math.random(0,2) local oynanan = bilinmeyen if tkm == tas then local oynanan == tas elseif tkm == kagit then local oynanan == kagit elseif tkm == makas then local oynanan == makas end When i debug it i got an error unexpected symbol near == line 6.
  22. What will do if i set debugscript 3
  23. Now im testing and markerleave function doesnt works.
×
×
  • Create New...