07.07.2012, 05:35
Okay, so im making a /countdown command, and im probably making it harder than it really should be. But im trying to convert the integer into a string or vise versa so i can use TextDrawSetString. But even when i strval i get an error on the TextDrawSetString line.
i dont know how to use strval so its probably wrong... I just want the textdrawsetstring to be the number you type in for countdown..
pawn Код:
CMD:countdown(playerid,params[])
{
new string[4] = "4";
new countdown = strval(string);
CountTime = countdown;
if(!IsAdmin(playerid, 1)) return ErrorMsg(playerid);
if(sscanf(params, "i", countdown)) return Usage(playerid, "/countdown [time]");
TextDrawSetString(AnnText, CountTime);
TextDrawShowForAll(AnnText);
CountTimer = SetTimer("CountDown",1000,true);
return 1;
}