SA-MP Forums Archive
Duda sobre 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: Duda sobre timers (/showthread.php?tid=201922)



Duda sobre timers - mark.18 - 22.12.2010

Si yo por ejemplo pongo en ongamemodeinit un timer que ejecute X accion cada media hora, cuando inicia el gm(cuando carga ongamemodeinit) se ejecuta el timer o noї?


Re: Duda sobre timers - [L3th4l] - 22.12.2010

Si,
pawn Код:
SetTimer("Funcion", 30 minutos aqui ;P, true); // Ejecutara cada 30 minutes i repitira, al empezar OnGameModeInit.
Entonces a tu pregunta, si


Re: Duda sobre timers - mark.18 - 22.12.2010

Gracias, pues ya esta, eso es todo :P,


Un saludo


Re: Duda sobre timers - Zamaroht - 22.12.2010

Creo que sonу medio confuso. El "timer" si se ejecutarб una vez sola en OnGameModeInit. Sin embargo, la funciуn a la que llama el timer, no se ejecutarб al iniciar el GM, sino que se ejecutarб por primera vez a la media hora, y por segunda vez a la hora, etc.


Re: Duda sobre timers - mark.18 - 22.12.2010

Quote:
Originally Posted by Zamaroht
Посмотреть сообщение
Creo que sonу medio confuso. El "timer" si se ejecutarб una vez sola en OnGameModeInit. Sin embargo, la funciуn a la que llama el timer, no se ejecutarб al iniciar el GM, sino que se ejecutarб por primera vez a la media hora, y por segunda vez a la hora, etc.
Ammm entonces lo dejo asi


WeatherUpdate();
SetTimer("WeatherUpdate",1800000,true);

Y solucionado

Un saludo


Re: Duda sobre timers - Zamaroht - 22.12.2010

Quote:
Originally Posted by mark.18
Посмотреть сообщение
Ammm entonces lo dejo asi


WeatherUpdate();
SetTimer("WeatherUpdate",1800000,true);

Y solucionado

Un saludo
Exacto