Textdraw help +rep - 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: Textdraw help +rep (
/showthread.php?tid=552063)
Textdraw help +rep -
Ryz - 22.12.2014
Hello
I have made system that if player accidentally press escape when selectable textdraw is open, call back will make him again selectable.
But problem is that textdraws doesn't getting cancel select.
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == Landmine)
{
SendClientMessage(playerid, -1,"test ok");
}
CancelSelectTextDraw(playerid);
}
else
{
SelectTextDraw(playerid,COLOR_SKYBLUE);
}
return 1;
}
Re: Textdraw help +rep -
M4D - 22.12.2014
Try this
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == Landmine)
{
SendClientMessage(playerid, -1,"test ok");
CancelSelectTextDraw(playerid);
}
}
else
{
SelectTextDraw(playerid,COLOR_SKYBLUE);
}
return 1;
}
Re: Textdraw help +rep -
Ryz - 22.12.2014
Not working
Re: Textdraw help +rep -
Write - 22.12.2014
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == Landmine)
{
SendClientMessage(playerid, -1,"test ok");
}
CancelSelectTextDraw(playerid);
TextDrawHideForPlayer(playerid, Landmine);
}
return 1;
}
You don't place this SelectTextDraw(playerid,COLOR_SKYBLUE); in OnPlayerClickTextDraw, you place it where you show the player the textdraw like:
pawn Код:
CMD:landmine(playerid, params[])
{
TextDrawShowForPlayer(playerid, Landmine);
SelectTextDraw(playerid, COLOR_SKYEBLUE);
return 1;
}
Re: Textdraw help +rep -
Ryz - 22.12.2014
No No i have added that SelectTextDraw(playerid, COLOR_SKYEBLUE); cuz of key escape.
i mean if player accidentally press escape.
Re: Textdraw help +rep -
Write - 22.12.2014
You're not making any sense right now, what key escape?
Re: Textdraw help +rep -
Ryz - 23.12.2014
Quote:
Originally Posted by Turn
You're not making any sense right now, what key escape?
|
man key 'ESC'. a escape key. if press escape key textdraws will get cancelselect so i wanted to stop that in my this new codes.