Stopping spam in OnPlayerUpdate.
#2

That's not possible, the callback is supposed to be called every time a new piece of information is synced by the user, which means it will get called a lot.

You should consider using a timer instead, using SetTimer or SetTimerEx depending on which one is most appropriate for your situation.

https://sampwiki.blast.hk/wiki/SetTimer
https://sampwiki.blast.hk/wiki/SetTimerEx

With that said, if you literally meant you only want it to do something once then why are you using it at all? Simply use another callback such as OnPlayerConnect which is only called once when the player connects, but I don't really know which one is most appropriate for you with so little information.
Reply


Messages In This Thread
Stopping spam in OnPlayerUpdate. - by cloudysky - 07.06.2012, 13:12
Re: Stopping spam in OnPlayerUpdate. - by JaTochNietDan - 07.06.2012, 13:16
Re: Stopping spam in OnPlayerUpdate. - by cloudysky - 07.06.2012, 13:31
Re: Stopping spam in OnPlayerUpdate. - by milanosie - 07.06.2012, 13:35

Forum Jump:


Users browsing this thread: 1 Guest(s)