Dialog issues
#1

Hello there,

I'm currently creating some dialogs and it goes good, anyway I've made stats dialog using the adialog include that was made by adri. and to avoid lag I made that when someone is viewing the dialog he gets
pawn Код:
StatsOn[playerid] = 1;
and I made when he clicks in any textdraw he gets it back to zero but what about when a player presses [ESC] how do I make it that it will be set to zero. I really need help thanks.
Reply
#2

use https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Reply
#3

Explain more please
Reply
#4

ESC isn't detected? I looked into this list

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

is this true?
Reply
#5

In dialogs, in OnDialogResponse callback, the response will be 0 if the player chose the second option; however, using ESC to close a dialog does the same thing.

In textdraws, if they are clickable then you'll need OnPlayerClickTextDraw callback to know when they press ESC button. In the callback, you check if the clickedid is the textdraw you've made and if so, you do some code in it. When they click on the textdraw and you cancel the select, it returns INVALID_TEXT_DRAW. So you'll need to check if the clickedid is INVALID_TEXT_DRAW and if it is, then you know they pressed esc.
Reply
#6

Thanks mate, I really appreciate it, you've got such a great intent yo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)