timer bug
#1

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;
}
Reply
#2

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);
}
Reply
#3

I found another solution by myself but thanks anyway!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)