OnPlayerUpdate Delay?
#1

Does anyone know how much ms is that callback?
Reply
#2

what how much is that callback?
you mean how many times is it called? then its called every second while you do a action.or it could be when you chage your state i mean driveing spectating etc... dont know perfectly sorry.
Reply
#3

As far as I know, it gets called at about every second if you're standing still and doing nothing and if you move ( Drive, run, whatever. ) it gets called many more times, not exactly sure how much times though.

Best regards,
Jesse
Reply
#4

Thank you both. Well, for cheap host, seems I have to use timers instead of this.
Reply
#5

how about you show what you are putting in it so others can help you optimize it?
Reply
#6

Actually it is for general things such as glass objects re-create, players' exp bar update, scores, anti cheats etc. but I made a 2000 ms timer for all of them. I think it will reduce CPU usage.
Reply
#7

now sure what you mean by the window thing, exp should be done when the experience changes, anticheat is perfect for OPU, also running everything on a 2000ms timer might be worse if they're all doing the checks in the same function.

there's a profiler plugin that allows you to see what's causing bottlenecks in your script
Reply
#8

Not everyting on same timer but if there are a few timers which running at the same time (like 10 timers) might be bad for CPU that's why I put similar checks in a same timer.

Код:
SetTimer("update",2000,1); // expbar, anti-cheats, TAB Score
SetTimer("ping",30000,1); // high ping checker
SetTimer("SendMSG",300000,1); // random msgs
SetTimer("Payday",3600000,1); // payday
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)