Help "Syntax error" - 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: Help "Syntax error" (
/showthread.php?tid=424504)
Help "Syntax error" -
Anak - 22.03.2013
Fixed
Re: Help "Syntax error" -
Rock - 22.03.2013
Where did you call KillTimer? Or FLIGHT_TO_LV and others are publics?
Re: Help "Syntax error" -
Anak - 22.03.2013
FIXED.
Respuesta: Help "Syntax error" -
Parka - 22.03.2013
hello friend learn to use
KillTimer
Re: Help "Syntax error" -
Anak - 22.03.2013
i don't understand it :S .. can you show me?
Respuesta: Help "Syntax error" -
Parka - 22.03.2013
pawn Код:
new timer1;
public OnGameModeInit()
{
print("Starting timer...");
timer1 = SetTimer("message", 1000, true);
}
forward message();
public message()
{
if(some_condition)
{
KillTimer(timer1);
}
else
{
print("1 second has passed");
}
}
Re: Respuesta: Help "Syntax error" -
Anak - 22.03.2013
Quote:
Originally Posted by cesar_******
pawn Код:
new timer1; public OnGameModeInit() { print("Starting timer..."); timer1 = SetTimer("message", 1000, true); } forward message(); public message() { if(some_condition) { KillTimer(timer1); } else { print("1 second has passed"); } }
|
i saw that on samp wiki but i want to know how to kill multiple timers in one command?
Re: Help "Syntax error" -
Anak - 22.03.2013
FIXED
Respuesta: Help "Syntax error" -
Parka - 22.03.2013
EXAMPLE:
pawn Код:
new Time[4]; // in this case 4 times
/// any CallBack
Time[0] = SetTimer("FunctionA", 1000, true);
Time[1] = SetTimer("FunctionB", 1000, true);
Time[2] = SetTimer("FunctionC", 1000, true);
Time[3] = SetTimer("FunctionD", 1000, true);
/// any CallBack
for( new i; i < Time; i++)
{
KillTimer( Time[i] );
}
Re: Help "Syntax error" -
Anak - 22.03.2013
thanks..

i can do this also?
pawn Код:
new T1;
new T2;
new T3;
new T4;
T1 = SetTimer("FunctionA", 1000, true);
T2 = SetTimer("FunctionB", 1000, true);
T3 = SetTimer("FunctionC", 1000, true);
T4 = SetTimer("FunctionD", 1000, true);
// in command?
KillTimer(T1);
KillTimer(T2);
KillTimer(T3);
KillTimer(T4);
asking for information..