[HELP] OnPlayerKeyStateChange
#1

Fixed.
Reply
#2

The check should come after the player pressed the button. You get the message twice because when someone pushes a button the state of the button changes twice (once when it's pressed and once when it's released).

pawn Код:
if(PRESSED(KEY_SOMETHING)) {
    if(IsPlayerInAnyVehicle(playerid)) {
        // command
    }
}
Reply
#3

Quote:
Originally Posted by Sinner
Посмотреть сообщение
The check should come after the player pressed the button. You get the message twice because when someone pushes a button the state of the button changes twice (once when it's pressed and once when it's released).
Please read the edit.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)