Death Posted March 1, 2015 Posted March 1, 2015 local pre_ataque[zona] = setTimer(function() if iniciando[zona] <= 100 then iniciando[zona] = members_in_turf[team][zona] + iniciando[zona] else Atacar(thePlayer,zona,group,gang) end end,500,0) function tester(thePlayer,zona) local gang = getPlayerTeam(thePlayer) local team = getTeamName(gang) local timerr[thePlayer] = setTimer(function() triggerClientEvent(thePlayer, "onPreAtaque", thePlayer, iniciando[zona], zona) end,500,0) end function Atacar(thePlayer,zona,group,gang) zoned = zona outputChatBox (zoned) killTimer(iniciando[zoned]) killTimer(timerr[thePlayer]) triggerClientEvent(thePlayer, "onIniciarAtaque", thePlayer, zoned) end
Et-win Posted March 1, 2015 Posted March 1, 2015 Any errors? Which one doesn't work? ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
Death Posted March 1, 2015 Author Posted March 1, 2015 Bad argument @ 'killTimer' [Expected lua-timer at argument 1] Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got number '101'] two killtimer not work
Enargy, Posted March 2, 2015 Posted March 2, 2015 Try removing 'thePlayer' from timerr[thePlayer] - Inactivo.
Moderators IIYAMA Posted March 2, 2015 Moderators Posted March 2, 2015 if isTimer(iniciando[zoned]) then killTimer(iniciando[zoned]) end iniciando[zoned]= nil -- clean up You can't kill a timer which doesn't exist any more. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Death Posted March 2, 2015 Author Posted March 2, 2015 resolved. I was trying to kill a variable instead of the timer. hugs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now