06.08.2009, 23:17
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:
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
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);
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