Need help with clickable textdraws. - 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: Need help with clickable textdraws. (
/showthread.php?tid=469064)
Need help with clickable textdraws. -
edzis84 - 11.10.2013
Hello everyone, i'm having following problem - When i press on the arrows nothing happends.
Код:
new PlayerText:RButton[MAX_PLAYERS];
new PlayerText:LButton[MAX_PLAYERS];
//On the top of the script
Код:
LButton[playerid] = CreatePlayerTextDraw(playerid,5.000000, 192.000000, "~<~");
PlayerTextDrawBackgroundColor(playerid,LButton[playerid], 255);
PlayerTextDrawFont(playerid,LButton[playerid], 1);
PlayerTextDrawLetterSize(playerid,LButton[playerid], 1.500000, 1.500000);
PlayerTextDrawColor(playerid,LButton[playerid], -1);
PlayerTextDrawSetOutline(playerid,LButton[playerid], 0);
PlayerTextDrawSetProportional(playerid,LButton[playerid], 1);
PlayerTextDrawSetShadow(playerid,LButton[playerid], 1);
//Creating arrow textrdaws (same for other one)
Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(GetIntVar(playerid, "Moding") == 1)
{
if(playertextid == RButton[playerid])
{
SCM(playerid,-1,"++");
}
if(playertextid == LButton[playerid])
{
SCM(playerid,-1,"--");
}
}
This is what i got under OnPlayerClickPlayerTextDraw (of course it returns, its just part of it)
Код:
PlayerTextDrawShow(playerid, RButton[playerid]);
PlayerTextDrawShow(playerid, LButton[playerid]);
SetIntVar(playerid, "Moding", 1);
//This is what i got under my command.
Re: Need help with clickable textdraws. -
Jefff - 11.10.2013
https://sampwiki.blast.hk/wiki/PlayerTextDrawSetSelectable
Re: Need help with clickable textdraws. -
dannyk0ed - 12.10.2013
Quote:
Originally Posted by Jefff
|
If you didn't understand what he meant he said to do.
pawn Код:
PlayerTextDrawSetSelectable(playerid, PlayerText:RButton, 1);
PlayerTextDrawSetSelectable(playerid, PlayerText:LButton, 1);
under each creation.
Re: Need help with clickable textdraws. -
edzis84 - 12.10.2013
Thanks dannyk0ed