How do I change interiors by pressing buttons on keyboard?
#1

I have made a command to teleport player to different interiors. Using /int [id] the player can go to the interior to which the [id] belongs to. But I want to bind this command to a keyboard button (Such as Y a.k.a KEY_YES) so that when Y is pressed, cmd_int(playerid, id); is called and the player is teleported to the interior. How do I do this? Please help me.

I tried doing it in OnPlayerKeyStateChange and OnPlayerUpdate + GetPlayerKeys but I'm unable to bind the command to the key
Reply
#2

Just check if their newkey is KEY_YES under OnPlayerKeyStateChange and proceed from there?
Reply
#3

Yes it worked. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)