Timer / Textdraw bug
#1

Okay, so basically, when the player gets arrested 2 timers start, the UnJail timer (working) and the Text draw timer showing time left (semi-working)
The JailTime timer counts down from 30 sucesfully but when it reaches 1 the text draw doesnt hide and it stays at "time remaining: 1"
then when the next player is arrested it shows the timer for the previous arrest player but the timer is going faster. it counts down from 30, id say about in 10-15 seconds.

pawn Код:
SetTimerEx("JailTimer", 999, true, "i", targetid);
pawn Код:
public JailTimer(targetid)
{
    jailtime--;
    if(jailtime > 0 && jailed[targetid] == 1)
    {
        new string[10];
        format(string,sizeof(string), "%i", jailtime);
        TextDrawSetString(JailTime[1], string);
        TextDrawShowForPlayer(targetid, JailTime[0]); //message saying Time Remaining
        TextDrawShowForPlayer(targetid, JailTime[1]); //the actual time being shown
    }
    else if (jailtime == 0)
    {
        TextDrawHideForPlayer(targetid, JailTime[0]);
        TextDrawHideForPlayer(targetid, JailTime[1]);
    }
    return 1;
}
Reply


Messages In This Thread
Timer / Textdraw bug - by SnG.Scot_MisCuDI - 04.07.2012, 05:23
Re: Timer / Textdraw bug - by Tee - 04.07.2012, 05:31
Re: Timer / Textdraw bug - by SnG.Scot_MisCuDI - 04.07.2012, 05:37
Re: Timer / Textdraw bug - by MP2 - 04.07.2012, 05:40
Re: Timer / Textdraw bug - by Tee - 04.07.2012, 05:42
Re: Timer / Textdraw bug - by SnG.Scot_MisCuDI - 04.07.2012, 05:44
Re: Timer / Textdraw bug - by [KHK]Khalid - 04.07.2012, 05:46
Re: Timer / Textdraw bug - by Tee - 04.07.2012, 05:48
Re: Timer / Textdraw bug - by SnG.Scot_MisCuDI - 04.07.2012, 05:49
Re: Timer / Textdraw bug - by [KHK]Khalid - 04.07.2012, 05:52

Forum Jump:


Users browsing this thread: 1 Guest(s)