OnPlayerClickPlayerTextDraw
#1

i m working on new register login system i made textdraws and i did selecttext too
but its not working i am not able to click on textdraw and my textdraw are already selectable
help please.
Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    new str[200];
	if(_:playertextid != INVALID_TEXT_DRAW) 
	{
		if(playertextid == LOGIN_PLAYER[playerid][3])
		{
		 my mssg
		}
		else if(playertextid == LOGIN_PLAYER[playerid][12])
		{
		 my dialog login
		}
		else if(playertextid == REGISTER_PLAYER[playerid][3])
		{
		 mymssg
		}
		else if(playertextid == REGISTER_PLAYER[playerid][12])
		{
		 my dialog
		}

    	for(new maxtd;maxtd<13;maxtd++)
		{
		 PlayerTextDrawHide(playerid, LOGIN_PLAYER[playerid][maxtd]);
		 PlayerTextDrawHide(playerid, REGISTER_PLAYER[playerid][maxtd]);
		}
		CancelSelectTextDraw(playerid);
	}
	return 0;
}
i removed if(_layertextid != INVALID_TEXT_DRAW)
too but still not working help please
Reply
#2

edit the textsize
Reply
#3

Quote:
Originally Posted by Lokii
Посмотреть сообщение
edit the textsize
is their any need of that uh...
Reply
#4

Quote:
Originally Posted by CrystalGamer
Посмотреть сообщение
is their any need of that uh...
Yes you have to calculate it for every one. Requires a lot of testing and trieing. An example:

Код:
	CapacityText[playerid] = CreatePlayerTextDraw(playerid, 32.000000, 290.000000, "Vehicle Capacity (0/10)");
	PlayerTextDrawBackgroundColor(playerid, CapacityText[playerid], 255);
	PlayerTextDrawFont(playerid, CapacityText[playerid], 1);
	PlayerTextDrawLetterSize(playerid, CapacityText[playerid], 30.200000, 1.000000);
	PlayerTextDrawColor(playerid, CapacityText[playerid], -1);
	PlayerTextDrawSetOutline(playerid, CapacityText[playerid], 1);
	PlayerTextDrawSetProportional(playerid, CapacityText[playerid], 1);
	PlayerTextDrawSetSelectable(playerid, CapacityText[playerid], 0);
	CapacityBar[playerid] = CreatePlayerProgressBar(playerid, 30.000000, 304.000000, 118.500000, 6.199999, -1429936641, TRASH_LIMIT, 0);
PlayerTextDrawLetterSize(playerid, textdrawid, width, heigth);
Reply
#5

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Yes you have to calculate it for every one. Requires a lot of testing and trieing. An example:

Код:
	CapacityText[playerid] = CreatePlayerTextDraw(playerid, 32.000000, 290.000000, "Vehicle Capacity (0/10)");
	PlayerTextDrawBackgroundColor(playerid, CapacityText[playerid], 255);
	PlayerTextDrawFont(playerid, CapacityText[playerid], 1);
	PlayerTextDrawLetterSize(playerid, CapacityText[playerid], 30.200000, 1.000000);
	PlayerTextDrawColor(playerid, CapacityText[playerid], -1);
	PlayerTextDrawSetOutline(playerid, CapacityText[playerid], 1);
	PlayerTextDrawSetProportional(playerid, CapacityText[playerid], 1);
	PlayerTextDrawSetSelectable(playerid, CapacityText[playerid], 0);
	CapacityBar[playerid] = CreatePlayerProgressBar(playerid, 30.000000, 304.000000, 118.500000, 6.199999, -1429936641, TRASH_LIMIT, 0);
PlayerTextDrawLetterSize(playerid, textdrawid, width, heigth);
their is no problem in lettertextsize problem was in textsize
after removing that its fixed ok
Reply
#6

https://sampwiki.blast.hk/wiki/OnPlayerClickPlayerTextDraw

Read this and it will work! & Follow their steps
Reply
#7

Quote:
Originally Posted by CrystalGamer
Посмотреть сообщение
their is no problem in lettertextsize problem was in textsize
after removing that its fixed ok
I actually ment PlayerTextDrawTextSize.
My bad
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)