Quick Question
#1

Whats a good interval for a timer that checks GetPlayerKeys ?

Thanks.
Reply
#2

OnPlayerUpdate is the best for this case.
Reply
#3

Thanks
Reply
#4

Quote:
Originally Posted by yezizhu
OnPlayerUpdate is the best for this case.
No, it's not, why do people keep thinking that?
OnPlayerUpdate gets called about 20 times a second per player, you should not do things like GetPlayerKeys in it.
A timer depends totally on how important keys are to you, but about 1 or 2 seconds would do fine.
Reply
#5

There's also the OnPlayerKeyStateChange callback if you don't need walking buttons (up, down, left, right).
Reply
#6

Quote:
Originally Posted by Simon
There's also the OnPlayerKeyStateChange callback if you don't need walking buttons (up, down, left, right).
It's for a food menu and i need left/right. I made an interval to 500ms, it works fine
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)