Quote:
Originally Posted by s4kuL
Nгo testei.
pawn Код:
new Text:Contagem; new TimerContagem; new TempoDaContagem = 10;
public OnGameModeInit() { Contagem = TextDrawCreate(300, 300, "_"); TextDrawFont(Contagem , 1); TextDrawLetterSize(Contagem , 2, 14); TextDrawColor(Contagem , -1); TextDrawSetOutline(Contagem , 0); TextDrawSetProportional(Contagem , 1); TextDrawSetShadow(Contagem , 0);
return true; }
CMD:iniciarcontagem(playerid) { SendClientMessage(playerid, -1, "Contagem de 10 segundos inciada!"); TextDrawShowForAll(Contagem); TimerContagem = SetTimer("Timer", 1000, true); return 1; }
forward Timer(); public Timer() { TempoDaContagem --; new String[2]; format(String,sizeof(string),"%d",TempoDaContagem); TextDrawSetString(Contagem, String); if(TempoDaContagem == 0) { TempoDaContagem = 10; KillTimer(TimerContagem); TextDrawHideForAll(Contagem); } return 1; }
Mas й mais ou menos assim..
|
Tem um erro no seu forward.. na linha do format, colocou o string com letra minъscula..
PHP код:
format(String,sizeof(String),"%d",TempoDaContagem);