30.12.2011, 15:01
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);
}
}