help me guys
#6

Quote:
Originally Posted by TheBeastKhan
Посмотреть сообщение
No it won't, the first one is hell fine, Becoz he got SetTimerEx(*Code*, playerid)
The playerid in it will kill only the Playerid...
What? If the timer starts with the player id 2 as parameter and while it's running the player with ID 2 logs out and another one logs in he will get killed.

Simply add this:

Код:
public OnPlayerDisconnect(playerid, reason)
{
         KillTimer(killtimer[playerid]);
         killtimer[playerid] = -1;
         return 1;
}
Assuming that you have defined ' killtimer ' variable
Otherwise add this at the top of your script:

Код:
new killtimer[MAX_PLAYERS];
Another thing
You shouldn't give to the players the possibility to spam that command because they can start many timers and I guess you don't want that

So add a small check under your command
Reply


Messages In This Thread
help me guys - by GameOvr - 17.06.2018, 17:20
Re: help me guys - by Lokii - 17.06.2018, 17:28
Re: help me guys - by GameOvr - 17.06.2018, 17:39
Re: help me guys - by CaptainBoi - 17.06.2018, 18:05
Re: help me guys - by TheBeastKhan - 17.06.2018, 18:53
Re: help me guys - by Lucases - 17.06.2018, 22:30

Forum Jump:


Users browsing this thread: 2 Guest(s)