SA-MP Forums Archive
Dialog Canceling Seletion whit ''ESC'' - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog Canceling Seletion whit ''ESC'' (/showthread.php?tid=429760)



TexDraw Canceling Seletion whit ''ESC'' - Henix - 11.04.2013

Hello guy after 3 days playing whit textDraws me get problem
Closing "selectable" when ppl click "Esc"-key and idk how to Disable this ?


Re: Dialog Canceling Seletion whit ''ESC'' - Faisal_khan - 11.04.2013

As far as I know that cannot be changed. It is client-side.


Re: Dialog Canceling Seletion whit ''ESC'' - Henix - 11.04.2013

its poseble to neotralize whit times (cca1sec refresh) but i think this is not so good idea


Re: Dialog Canceling Seletion whit ''ESC'' - FalconX - 11.04.2013

Quote:
Originally Posted by Henix
Посмотреть сообщение
its poseble to neotralize whit times (cca1sec refresh) but i think this is not so good idea
for dialogs, ESC works as the right button of the dialog.

pawn Код:
if( response ) // left button
{
}
else // right button or ESC
{
}
afaik


Re: Dialog Canceling Seletion whit ''ESC'' - Luis- - 11.04.2013

Код:
if(!response) return 1;



Re: Dialog Canceling Seletion whit ''ESC'' - park4bmx - 11.04.2013

This is textdraws !

The only way is to make a variable to check whether the textdraws is shown or not.

So then u run a timer checking every 1/2 sec if the themtexture is closed by the variable u created.


Re: Dialog Canceling Seletion whit ''ESC'' - park4bmx - 11.04.2013

Very true, I first thought it was about dialogs but then read his post and was suddenly about textdraws ;x


Re: Dialog Canceling Seletion whit ''ESC'' - MP2 - 11.04.2013

Sigh. Please learn English.


If the textdraw ID passed to OnPlayerClickTextDraw is INVALID_TEXT_DRAW and you don't want it to be closed, re-call SelectTextDraw there, but be aware of recursions.

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == INVALID_TEXT_DRAW && some_condition)
    {
        SelectTextDraw(playerid, color);
        return 1;
    }
    return 0;
}



Re: Dialog Canceling Seletion whit ''ESC'' - Henix - 11.04.2013

uf sorry guys u wrong title

i got problem when is texdraw selectable and ppl klick key "ESC" the selectable mod be disabled :S



Quote:
Originally Posted by park4bmx
Посмотреть сообщение
This is textdraws !

The only way is to make a variable to check whether the textdraws is shown or not.

So then u run a timer checking every 1/2 sec if the themtexture is closed by the variable u created.
oh this is bad for me (true haiter of times)


Re: Dialog Canceling Seletion whit ''ESC'' - Faisal_khan - 11.04.2013

Quote:
Originally Posted by Henix
Посмотреть сообщение
uf sorry guys u wrong title

i got problem when is texdraw selectable and ppl klick key "ESC" the selectable mod be disabled :S





oh this is bad for me (true haiter of times)
That ain't a problem. That has to be. When someone press ESC the mouse has to be disabled. Even Kalcor has this ability.