Help: is necessary in this script to kill the timer ? - 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: is necessary in this script to kill the timer ? (
/showthread.php?tid=373005)
Help: is necessary in this script to kill the timer ? -
NewbieScripter - 28.08.2012
is necessary in this script to kill the timer ? and can improve or optimize the code?
pawn Код:
// OnGameModeInit
// Textdraws here...
/* ------------------------------------------------------------------ */
// OnPlayerConnect
TextDrawShowForPlayer(playerid, loading[0]), TextDrawShowForPlayer(playerid, loading[1]);
TogglePlayerSpectating(playerid, true);
SetTimerEx("@DestroyTextDraw", 8000, false, "d", playerid);
/* ------------------------------------------------------------------ */
// ...
forward @DestroyTextDraw(playerid);
@DestroyTextDraw(playerid)
{
TextDrawHideForPlayer(playerid, loading[0]), TextDrawHideForPlayer(playerid, loading[1]);
TogglePlayerSpectating(playerid, false);
return 1;
}
Re: Help: is necessary in this script to kill the timer ? -
ikkentim - 28.08.2012
I dont know wether @ works as the fist character in a function/var. since the timer's "repeating" value is set to false, you do not need to kill it.
Re: Help: is necessary in this script to kill the timer ? -
NewbieScripter - 28.08.2012
OK, thanks. for the @ symbol do declare public functions yes, it works..