SA-MP Forums Archive
Timers. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Timers. (/showthread.php?tid=562824)



Timers. - GuitarMan - 11.02.2015

Hello.
Im not quite familiar with timers. Today i wanted to do a timer, that adds a value to a variable each minute.

so this is what i came up with:
PHP код:
forward RudaTime();
//On gamemode init:
    
SetTimer("RudaTime",60,true);
//in the end of the file:
public RudaTime()
{
    
RudaBank RudaBank 200;
    return 
1;

It does not seem to be working...


Re: Timers. - Jefff - 11.02.2015

1 sec = 1000ms
so result for 1 min = 60*1000 and RudaBank += 200;