Help: is necessary in this script to kill the timer ?
#1

is necessary in this script to kill the timer ? and can improve or optimize the code?

pawn Код:
new
    Text: loading[2];
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;
}
Reply
#2

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.
Reply
#3

OK, thanks. for the @ symbol do declare public functions yes, it works..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)