Cancelling Selection Menu When press "ESC"
#1

Hello, i need help with skin selection menu. it works fine whenever player select the skin from the menu.

But if someone press "ESC" Key without selecting the skin in order to hide that textdraw, it bugs and stays there.. then it cant be hidden? and then player can't evem select the skin.

how to remove the selection menu when a player press "ESC" key?

HELP? im using default SAMP FS (skin_c) one of skin selection through that selection menu.
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw

Have a look here, and what it tells you:

Quote:
Originally Posted by From SA-MP Wiki, OnPlayerClickTextDraw
clickedid: The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled.
This way, you can check if the selection was cancelled, whereas the player clicks esc, f.ex.

So, you can simply check if the textdraw-selection of yours is cancelled, and then just recreate the texdraws instead of letting them destroy

Also make sure to make yourself a variable to detect if the player is in the selection. Then, use the same variable to check if the INVALID_TEXT_DRAW is pressed when that variable is true, in order to make it work only in that situation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)