Can we use IN_* keys in menus?
Can we use IN_* keys in menus?
Example: I have some item on slot 1 and it will do something if I press slot1. Can I do check if player holds IN_RUN (on another key) pressed and slot1 to do another action? https://i.ibb.co/QdVFx8F/image.png |
Re: Can we use IN_* keys in menus?
store it in a global variable?
|
Re: Can we use IN_* keys in menus?
Quote:
|
Re: Can we use IN_* keys in menus?
(get_user_button(id)&IN_RUN) (or IN_SPEED was it?) will be true if the player is holding shift, so add that check in your handler function
something like this public menu_handler(id, key) { if(get_user_button(id)&IN_RUN))//shift held { switch(key){ case 1://if 1 + SHIFT pressed case 2://if 2 + SHIFT pressed //... } } else { switch(key){ case 1: // if 1 only pressed case 2: // if 2 only pressed } } |
| All times are GMT -4. The time now is 15:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.