27.07.2011, 17:43
This will work (the one before isn't good for you )
Here (No extra Variables required):
Example usage:
Here (No extra Variables required):
pawn Код:
forward CountdownTextDraw(playerid, Text:textid, secondstocount);
public CountdownTextDraw(playerid, Text:textid, secondstocount)
{
if(secondstocount == 0) { TextDrawHideForPlayer(playerid, textid); }
else {
new timestring[32];
format(timestring, sizeof(timestring), "%i seconds remaining..", secondstocount);
TextDrawSetString(textid, timestring);
TextDrawShowForPlayer(playerid, textid);
secondstocount--;
SetTimerEx("CountdownTextDraw", 1000, false, "ddd", playerid, textid, secondstocount);
}
return true;
}
pawn Код:
new Text:JailTextDraw;
JailTextDraw = TextDrawCreate(327.000000, 377.000000, "X");
TextDrawAlignment(JailTextDraw, 2);
TextDrawBackgroundColor(JailTextDraw, 255);
TextDrawFont(JailTextDraw, 2);
TextDrawLetterSize(JailTextDraw, 0.620000, 3.200000);
TextDrawColor(JailTextDraw, -1);
TextDrawSetOutline(JailTextDraw, 0);
TextDrawSetProportional(JailTextDraw, 1);
TextDrawSetShadow(JailTextDraw, 1);
CountdownTextDraw(playerid, JailTextDraw, 120);