OnPlayerUpdate [+REPS]
#5

Unlikely, but use the profiler plugin to be sure. There IS a lot of room for optimizations, however. Using a switch statement can reduce unnecessary calls to GetPlayerScore by 95%. IsPlayerConnected is also a completely redundant function call because callbacks are obviously only called if the player is connected.

But still, it'd be better to move the score part to a separate function entirely and invoke it whenever you use SetPlayerScore. You could write a hook to do it automatically.

PS: @ChuckyBabe above: use another avatar. Stealing the avatar of a reputable member is frankly just arrogant.
Reply


Messages In This Thread
OnPlayerUpdate [+REPS] - by SPA - 07.04.2014, 08:51
Re: OnPlayerUpdate [+REPS] - by ChuckyBabe - 07.04.2014, 08:56
Re: OnPlayerUpdate [+REPS] - by SPA - 07.04.2014, 09:15
Re: OnPlayerUpdate [+REPS] - by iBanner - 07.04.2014, 09:18
Re: OnPlayerUpdate [+REPS] - by Vince - 07.04.2014, 09:35
Re: OnPlayerUpdate [+REPS] - by SPA - 07.04.2014, 10:34

Forum Jump:


Users browsing this thread: 1 Guest(s)