Need help with clickable textdraws.
#1

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.
Reply
#2

https://sampwiki.blast.hk/wiki/PlayerTextDrawSetSelectable
Reply
#3

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.
Reply
#4

Thanks dannyk0ed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)