TextDrawSetSelectable(TPdraw5, true);
TPdraw5 = TextDrawCreate(310.000000, 151.000000, "Los Santos");
TextDrawBackgroundColor(TPdraw5, 255);
TextDrawFont(TPdraw5, 3);
TextDrawLetterSize(TPdraw5, 0.479999, 1.399999);
TextDrawColor(TPdraw5, -1);
TextDrawSetOutline(TPdraw5, 0);
TextDrawSetProportional(TPdraw5, 1);
TextDrawSetShadow(TPdraw5, 1);
TextDrawSetSelectable(TPdraw5, 1);
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(GetPVarInt(playerid, "furnc_active") == 0) return 0;
// Handle: They cancelled (with ESC)
if(clickedid == Text:INVALID_TEXT_DRAW) {
DestroyFurnitureSelectionMenu(playerid);
SetPVarInt(playerid, "furnc_active", 0);
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
return 1;
}
if(clickedid == TPdraw5)
{
SendClientMessage(playerid, 0xFFFFFFAA, "You clicked on a textdraw.");
CancelSelectTextDraw(playerid);
}
return 1;
}
COMMAND:tp(playerid, params[])
{
if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this.");
if(!AdminUser(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to create a admin user, /admincreate.");
if(GetPVarInt(playerid, "AdminLogged") == 0) return SendClientMessage(playerid, COLOR_GREY, "You need to login into your admin account, /adminlogin.");
if(GetPVarInt(playerid, "Admin") >= 1)
{
TextDrawShowForPlayer(playerid, TPdraw0); // Show the box
TextDrawShowForPlayer(playerid, TPdraw1); // Show the box
TextDrawShowForPlayer(playerid, TPdraw2); // Show the box
TextDrawShowForPlayer(playerid, TPdraw3); // Show the box
TextDrawShowForPlayer(playerid, TPdraw4); // Show the box
TextDrawShowForPlayer(playerid, TPdraw5); // Show the box
SelectTextDraw(playerid, 0xA3B4C5FF); // Allow the player to select textdraws.
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: You do not have access to this command!");
}
return 1;
}
Originally Posted by SA-MP Wiki
The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative.
|
You need to use TextDrawTextSize to set a clickable area. If you haven't done that, the textdraw won't be clickable I'm pretty sure.
|
It's either TextSize or LetterSize. Or u got your numbers wrong.
And, btw, cuase I enjoy posting useless post, whyle I wait for someone to help me in my thread.. |
No Useless Replies - If you are unsure or don't know how to proceed with solving an issue, then do not respond to the thread, it will be considered spam.
TextDrawSetSelectable(TPdraw5, true);
TPdraw5 = TextDrawCreate(310.000000, 151.000000, "Los Santos");
U can use TextDrawUseBox(); to check if u got ur TextSize (it's actually TextSize, not Letter) right. And, Put this
PHP код:
PHP код:
|