Question - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Question (
/showthread.php?tid=139866)
Question -
[LSB]TheGame - 06.04.2010
Killing a Timer using SetTimerEx?
Re: Question -
Kurence - 06.04.2010
forward timer(number);
new lmao;
...
lmao=SetTimerEx("timer",1000,1,"d",10);
...
KillTimer(lmao);
Re: Question -
Carlton - 06.04.2010
Set a variable on the timer. A example is;
pawn Код:
new HelloWorld, times[MAX_PLAYERS];
public OnPlayerSpawn(playerid) {
times[playerid] = 0;
HelloWorld = SetTimerEx("HelloWorldTimer", 1000, 1, "d", playerid);
return 1;
}
forward HelloWorldTimer(playerid);
public HelloWorldTimer(playerid) {
switch(times[playerid]) {
case 0: {
print("Hello World");
times[playerid] ++;
}
case 1: {
print("Bye world");
KillTimer(HelloWorld);
}
}
return 1;
}
Re: Question -
[LSB]TheGame - 10.05.2010
yeah but for like if the person dies/disconnects it stops
Re: Question -
Conroy - 10.05.2010
Place the KillTimer(Variable) in OnPlayerDeath or OnPlayerDisconnect.
Re: Question -
[LSB]TheGame - 15.05.2010
like this?
Код:
KillTimer(UsingWeed[playerid]);
Re: Question -
playbox12 - 15.05.2010
Quote:
|
Originally Posted by Kurence
forward timer(number);
new lmao;
...
lmao=SetTimerEx("timer",1000,1,"d",10);
...
KillTimer(lmao);
|
Lmao xD
Re: Question -
[LSB]TheGame - 15.05.2010
that isnt for a player