SA-MP Forums Archive
timer bug - 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: timer bug (/showthread.php?tid=157607)



timer bug - Andy_McKinley - 07.07.2010

I am not good at timers.

I tried to make textdraw that hides after 10 secs, well it doesn't show up at all...

pawn Code:
dcmd_nuke(playerid, params[])
{
    #pragma unused params
    if(PlayerKills[playerid] >= 0)
    {
        SetTimer("Nuke", 10000,0);
        counter ++;
        SendClientMessageToAll(COLOR_RED,"[!] WARNER [!] Nuclear Bomb has been activated!");
        TextDrawShowForAll(nuke);
        SetTimer("Nuke", 10000,0);
        TextDrawHideForAll(nuke);
        NC[playerid] = 0;
    }
    return 1;
}



Re: timer bug - dice7 - 07.07.2010

pawn Code:
dcmd_nuke(playerid, params[])
{
    #pragma unused params
    if(PlayerKills[playerid] >= 0)
    {
        counter ++;
        SendClientMessageToAll(COLOR_RED,"[!] WARNER [!] Nuclear Bomb has been activated!");
        TextDrawShowForAll(nuke);
        SetTimer("Nuke", 10000,0);
        NC[playerid] = 0;
    }
    return 1;
}

forward Nuke();
public Nuke()
{
    TextDrawHideForAll(nuke);
}



Re: timer bug - Andy_McKinley - 07.07.2010

I found another solution by myself but thanks anyway!