SA-MP Forums Archive
ayuda con y_timers. - 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: ayuda con y_timers. (/showthread.php?tid=611776)



ayuda con y_timers. - mcreed - 10.07.2016

bueno estoy intentando hacer un timer que se ejecute cada segundo.
me sale este error:
pawn Код:
undefined symbol "TDVersion_yT@"
codigo:
PHP код:
public OnGameModeInit()
{
   
defer TDVersion();
   return 
1;
}
task TDVersion[segundos(1)]()
{
    if(
TiempoRelease[1] < 1TiempoRelease[0]--;
    if(
TiempoRelease[2] < 1TiempoRelease[1]--, TiempoRelease[1] = 60;
    if(
TiempoRelease[3] < 1TiempoRelease[2]--, TiempoRelease[2] = 60;
    ForEach(
playerid,MAX_PLAYERS)
    {
        
TextDrawSetString(AlphaAnn,sprintf("~w~VERSION ~r~PRE-ALPHA ~r~~h~~h~0.3,~w~ la proxima ~b~~h~~h~version ~w~estara en ~p~~h~%d Dias ~w~con ~g~~h~~h~%d:%d:%d",TiempoRelease[0],TiempoRelease[1],TiempoRelease[2],TiempoRelease[3]));
        
TextDrawShowForPlayer(playerid,AlphaAnn);
    }
    return 
true;




Respuesta: ayuda con y_timers. - Unrea1 - 10.07.2016

" task " es una tarea, osea, un timer global que iniciarб apenas enciendas el server, no es necesario llamar el timer en OnGameModeInit.


Respuesta: ayuda con y_timers. - mcreed - 10.07.2016

oh gracias, soy nuevo con este include.
entonces un timer normal seria timer nombretimer y lo llamo con defer o repeat, dependiendo de lo que desee ?


Respuesta: ayuda con y_timers. - Adoniiz - 10.07.2016

Amigo si por alguna razуn tiene problemas con "repeat", no lo use, use "defer" y lo repite manualmente, solo ese consejo por si algun problema persiste cuando el servidor ya tiene varios dнas prendido. (No se sн estб arreglado pero antes de evitar problemas..)


Respuesta: ayuda con y_timers. - mcreed - 10.07.2016

Gracias.