#1

fixed
Reply
#2

I believe arrow keys can only be detected in a timer..
Reply
#3

Quote:
Originally Posted by Aber▲
I believe arrow keys can only be detected in a timer..
OnPlayerUpdate is faster than any timer.
Reply
#4

GetPlayerKeys isn't for timers only. Anyway it's not the key detection.

The code gets to that part.
Reply
#5

Quote:
Originally Posted by Don Correlli
OnPlayerUpdate is faster than any timer.
In which way it is faster? Or, how can you even compare a callback and a timer? They are totally different things.
Reply
#6

Forget the timers, the key detected works 100% perfect.
Reply
#7

Quote:
Originally Posted by 0rb
In which way it is faster?
I meant that it's called more often than any timer you set.

Quote:
Originally Posted by 0rb
Or, how can you even compare a callback and a timer? They are totally different things.
I never compared them.
Reply
#8

Quote:
Originally Posted by Don Correlli
OnPlayerUpdate is faster than any timer.
That's a comparison
"Callback > Timer"

What about the script doesn't work? Have you debugged it? You said that the keys are being detected, does that mean that pSkin[playerid] is being incremented? Try adding a buffer size to "new CopSkins[]" for testing.
Reply
#9

I will do some proper debugging.

EDIT:

Wow, I was setting pSkin to 281 by default LOL D:

Thanks for the help guys..
Reply
#10

Quote:
Originally Posted by 0rb
In which way it is faster? Or, how can you even compare a callback and a timer? They are totally different things.
Timer is not as accurate in getting i.e. keys of the players, unlike with OnPlayerUpdate you'll be able to detect all the changes that happens to the player.

I wouldn't suggest using OnPlayerUpdate, as it's proven that it'll cause lag (if has big piles of code in it) when used while loads of players connected. Timer set to 100 ms or such will do the same thing.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)