If player press any key
#1

how do I make a function when a player presses any key?
Reply
#2

OnPlayerKeyStateChange
Always ****** first then post here.
Reply
#3

yes i searched it, but the OnPlayerKeyStateChange, if isn't specified the key, it run if you press only the sprint key... Or fire key, too
Reply
#4

Tip: Directional keys do not trigger OnPlayerKeyStateChange (up/down/left/right). They can only be detected with GetPlayerKeys (in OnPlayerUpdate).
Reply
#5

Quote:
Originally Posted by DarK_FeneR
View Post
yes i searched it, but the OnPlayerKeyStateChange, if isn't specified the key, it run if you press only the sprint key... Or fire key, too
You can only detect if the player pressed any predifined keys ( https://sampwiki.blast.hk/wiki/Keys ) other than those you can not be detected.
Reply
#6

ah yes, i look later, thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)