03.04.2013, 12:58
offtopic: Nada que ver tu codigo, para la prуxima lee lo que dice el tema xD
ontopic:
Bueno un timer es facil podes hacer algo asi:
y cuando el jugador logra lo que tiene que hacer en ese tiempo para detener el gametext pones:
ontopic:
Bueno un timer es facil podes hacer algo asi:
pawn Код:
new Timer[MAX_PLAYERS], Segundos[MAX_PLAYERS];//arriba de tu gm
Timer[playerid] = SetTimerEx("TimerGameText", 1000, true, "i", playerid);//Esto va donde quieres que comienze el timmer por ejemplo OnPlayerConnect
Segundos[playerid] = 50;//Aqui pon la cantidad de segundos y esto va en el mismo lugar que el SetTimerEx
forward TimerGameText(playerid);//Todo esto tienes que pegarlo al final de tu gm, no dentro de ninguna callback
public TimerGameText(playerid)
{
new string[128];
format(string, sizeof(string), "~w~Tienes ~r~%d ~w~segundos", segundos);
GameTextForPlayer(playerid, string, 1000, 3);
Segundos--;
if(Segundos == 0)//Funciones cuando termina el timer y los segundos
{
KillTimer(Timer[playerid]);
}
}
pawn Код:
KillTimer(Timer[playerid]);