TimerEX - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: TimerEX (
/showthread.php?tid=619983)
TimerEX -
Eoussama - 24.10.2016
Hello guys, so I was wondering,
how to kill/stop a TimerEx for a player?
Re: [HELP] TimerEX -
Skimmer - 24.10.2016
PHP код:
KillTimer(connect_timer[playerid]);
Re: [HELP] TimerEX -
Eoussama - 24.10.2016
Quote:
Originally Posted by Skimmer
PHP код:
KillTimer(connect_timer[playerid]);
|
I tried that, but the timer kept runing
Re: [HELP] TimerEX -
Skimmer - 24.10.2016
How are you setting the timer? Can you show me the line?
Re: [HELP] TimerEX -
Eoussama - 24.10.2016
SetTimerEx("RapeEffect", RapeTimer, true, "i", playerid);
Re: [HELP] TimerEX -
Skimmer - 24.10.2016
Why you don't pass the
id of this timer into a variable? I mean.
PHP код:
new gRapeTimer[MAX_PLAYERS];
// initialize
gRapeTimer[playerid] = SetTimerEx("RapeEffect", RapeTimer, true, "i", playerid);
// to kill this timer
KillTimer(gRapeTimer[playerid]);
// Don't forget to clear the value when user leaves the server.
public OnPlayerDisconnect(playerid)
{
...
KillTimer(gRapeTimer[playerid]);
gRapeTimer = -1;
}
Re: [HELP] TimerEX -
Eoussama - 24.10.2016
Thank you bro
+REP