SA-MP Forums Archive
timer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: timer (/showthread.php?tid=537041)



timer - Metzone - 13.09.2014

hola, alguien me podrнa explicar como hacer un timer en ZC, por ejemplo un mensaje que se repdroduzca cada 30 segundos o alguna funcion de guardar cuenta o algo? un tutorial porfavor.


Re: timer - MrNatrio - 13.09.2014

Para hacer que salga un mensaje cada 30s pones esto en public OnGameModeInit():

pawn Код:
SetTimer("mensaje",30000,true);
y abajo del todo del GM pones esto:

pawn Код:
forward mensaje(playerid);
public mensaje(playerid)
{
  SendClientMessageToAll(playerid,-1,"Aquн va el mensaje"); //
  return 1;
}
Saludos.


Respuesta: timer - Stront - 13.09.2014

guardar cuenta

OnPlayerConnect

SetTimerEx("Timer", 60000*3, 1, "i", playerid);

forward Timer(playerid);
public Timer(playerid)
{
//FUNCION GUARDAR CUENTA
return 1;
}


Re: timer - Metzone - 13.09.2014

Gracias, me sirviу