settimer
#2

Firstly, about timers.
SetTimer should be used when you run global timer (for all server) while SetTimerEx should be used on the players.

If you want to put timer OnPlayerConnect then do next:
pawn Код:
SetTimerEx("FUNCTION",TIME,1,"d",playerid);
It will call a FUNCTION (which needs to be public and forwarded) each TIME milliseconds. If you use 0 instead of 1 timer will be called only one time, while 1 means repeately.

If you want to check something very frequently (anticheat?), I suggest you to use OnPlayerUpdate callback instead of very frequent timer.
More about it https://sampwiki.blast.hk/wiki/OnPlayerUpdate
and about SetTimerEx: https://sampwiki.blast.hk/wiki/SetTimerEx
Reply


Messages In This Thread
settimer - by Martin_Smith - 06.08.2009, 23:10
Re: settimer - by Sergei - 06.08.2009, 23:17

Forum Jump:


Users browsing this thread: 1 Guest(s)