Force SelectTextDraw - 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: Force SelectTextDraw (
/showthread.php?tid=534914)
Force SelectTextDraw -
Meisternuke - 31.08.2014
I've made an Registration Textdraw which is needed to clicked on.
But if I press ESC my Cursor disappears.
Is there a way to force SelectTextDraw to stay until the user have made his click?
Re: Force SelectTextDraw -
Pottus - 01.09.2014
https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw
clickedid The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled.
Therefore.
pawn Код:
static MyTextDrawOpen[MAX_PLAYERS];
static AllowMyTextDrawClose[MAX_PLAYERS];
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == INVALID_TEXT_DRAW)
{
// Action to perform on this textdraw when closing
if(MyTextDrawOpen[playerid])
{
// Textdraws allowed to close
if(AllowMyTextDrawClose[playerid]) MyTextDrawOpen[playerid] = false;
// Textdraws not allowed to close yet
else SelectTextDraw(playerid, 0x00FF00FF);
}
}
return 1;
}
AW: Force SelectTextDraw -
Meisternuke - 01.09.2014
> helped me very much ty