How to script this count?
#7

pawn Код:
// Your cmd
    TextDrawShowForPlayer(playerid, YourTextdraw);
    CountDown(YourTextdraw, playerid, 5);
pawn Код:
forward CountDown(Text: text, playerid, time);
public CountDown(Text: text, playerid, time) {
    if(time < 1) {
        TextDrawSetString(text, "~r~GoGo!");
        SetTimerEx("tTextDrawHide", 5000, false, "ii", playerid, _: text);
    } else {
        new
            str[8] = "~r~";
        valstr(str[3], time, false);
        TextDrawSetString(text, str);
        SetTimerEx("CountDown", 1000, false, "iii", _: text, playerid, --time);
    }
}
pawn Код:
forward tTextDrawHide(playerid, Text: text);
public tTextDrawHide(playerid, Text: text) {
    if(playerid == MAX_PLAYERS) {
        TextDrawHideForAll(text);
    } else {
        TextDrawHideForPlayer(playerid, text);
    }
}
Reply


Messages In This Thread
How to script this count? - by Spooky - 30.12.2011, 10:56
AW: How to script this count? - by Nero_3D - 30.12.2011, 11:32
Re: How to script this count? - by Spooky - 30.12.2011, 11:32
Re: How to script this count? - by Spooky - 30.12.2011, 12:28
Re: How to script this count? - by Tigerkiller - 30.12.2011, 13:16
Re: How to script this count? - by Spooky - 30.12.2011, 13:24
AW: How to script this count? - by Nero_3D - 30.12.2011, 15:01

Forum Jump:


Users browsing this thread: 3 Guest(s)