textdraws
#1

Hello, I was wondering why when I click on a TextDraw it selects other, kind, was to select just that I'm with the arrow on top, not the one with the arrow on top and the other nearby, I think this bug happens with many people, how can I fix it? just that I fix the person clicks on that clickable TextDraw and click, click others that have nothing to do, I will show my code I've done so far:

PHP код:
new PlayerText:pTextdrawSkins0;
new 
PlayerText:pTextdrawSkins1;
new 
PlayerText:pTextdrawSkins2;
new 
PlayerText:pTextdrawSkins3;
public 
OnPlayerClickPlayerTextDraw(playeridPlayerText:playertextid)
{
    if(
playertextid == pTextdrawSkins0)
    {
       
PlayerTextDrawHide(playeridPlayerText:pTextdrawSkins0);
       
PlayerTextDrawHide(playeridPlayerText:pTextdrawSkins1);
       
PlayerTextDrawHide(playeridPlayerText:pTextdrawSkins2);
       
PlayerTextDrawHide(playeridPlayerText:pTextdrawSkins3);
       
CancelSelectTextDraw(playerid);
       
       
AccountData[playerid][pChar] = GetPlayerSkin(playerid);
       
SetPlayerPos(playerid207.1889,-129.8818,1003.5078);
       
SetPlayerFacingAngle(playerid0.2991);
       
TogglePlayerControllable(playerid1);
       
SetCameraBehindPlayer(playerid);
       
       
SendClientMessage(playerid, -1"debug: skin confirmada!");
    }
    if(
playertextid == pTextdrawSkins1)
    {
       
PlayerTextDrawHide(playeridPlayerText:pTextdrawSkins0);
       
PlayerTextDrawHide(playeridPlayerText:pTextdrawSkins1);
       
PlayerTextDrawHide(playeridPlayerText:pTextdrawSkins2);
       
PlayerTextDrawHide(playeridPlayerText:pTextdrawSkins3);
       
CancelSelectTextDraw(playerid);
       
SetPlayerPos(playerid207.1889,-129.8818,1003.5078);
       
SetPlayerFacingAngle(playerid0.2991);
       
TogglePlayerControllable(playerid1);
       
SetCameraBehindPlayer(playerid);
       
SendClientMessage(playerid, -1"debug: skin cancelada!");
    }
    if(
playertextid == pTextdrawSkins3)
    {
       
PassarSkin(playerid0);
       
SendClientMessage(playerid, -1"debug: proxima skin!");
    }
    if(
playertextid == pTextdrawSkins2)
    {
       
PassarSkin(playerid1);
       
SendClientMessage(playerid, -1"debug: proxima skin!");
    }
}
/////
                
PlayerTextDrawShow(playeridPlayerText:pTextdrawSkins0);
                
PlayerTextDrawShow(playeridPlayerText:pTextdrawSkins1);
                
PlayerTextDrawShow(playeridPlayerText:pTextdrawSkins2);
                
PlayerTextDrawShow(playeridPlayerText:pTextdrawSkins3);
                
                
SelectTextDraw(playerid0x848484FF);
                
                if (
AccountData[playerid][pSex] == 1SetPlayerSkin(playerid1);
                else 
SetPlayerSkin(playerid9);
                
                
SetPlayerPos(playerid201.9326,-126.9587,1003.5078);
                
SetPlayerFacingAngle(playerid179.2377);
                
SetPlayerCameraPos(playerid,201.9442,-130.1344,1003.5078);
                
SetPlayerCameraLookAt(playerid201.7470,-126.8547,1003.9588);
                
TogglePlayerControllable(playerid0);
                
SetPlayerInterior(playerid3);
                
SendClientMessage(playerid, -1"debug: escolha a skin.");
////
    
pTextdrawSkins0 CreatePlayerTextDraw(playerid,190.000000372.000000"Confirmar");
    
PlayerTextDrawBackgroundColor(playerid,pTextdrawSkins0255);
    
PlayerTextDrawFont(playerid,pTextdrawSkins03);
    
PlayerTextDrawColor(playerid,pTextdrawSkins0, -1);
    
PlayerTextDrawSetOutline(playerid,pTextdrawSkins00);
    
PlayerTextDrawSetProportional(playerid,pTextdrawSkins01);
    
PlayerTextDrawSetShadow(playerid,pTextdrawSkins01);
    
PlayerTextDrawSetSelectable(playerid,pTextdrawSkins01);
    
pTextdrawSkins1 CreatePlayerTextDraw(playerid,407.000000373.000000"Cancelar");
    
PlayerTextDrawBackgroundColor(playerid,pTextdrawSkins1255);
    
PlayerTextDrawFont(playerid,pTextdrawSkins13);
    
PlayerTextDrawColor(playerid,pTextdrawSkins1, -1);
    
PlayerTextDrawSetOutline(playerid,pTextdrawSkins10);
    
PlayerTextDrawSetProportional(playerid,pTextdrawSkins11);
    
PlayerTextDrawSetShadow(playerid,pTextdrawSkins11);
    
PlayerTextDrawSetSelectable(playerid,pTextdrawSkins11);
    
pTextdrawSkins2 CreatePlayerTextDraw(playerid,211.000000217.000000"~<~");
    
PlayerTextDrawBackgroundColor(playerid,pTextdrawSkins2255);
    
PlayerTextDrawFont(playerid,pTextdrawSkins23);
    
PlayerTextDrawColor(playerid,pTextdrawSkins2, -1);
    
PlayerTextDrawSetOutline(playerid,pTextdrawSkins20);
    
PlayerTextDrawSetProportional(playerid,pTextdrawSkins21);
    
PlayerTextDrawSetShadow(playerid,pTextdrawSkins21);
    
PlayerTextDrawSetSelectable(playerid,pTextdrawSkins21);
    
pTextdrawSkins3 CreatePlayerTextDraw(playerid,453.000000217.000000"~>~");
    
PlayerTextDrawBackgroundColor(playerid,pTextdrawSkins3255);
    
PlayerTextDrawFont(playerid,pTextdrawSkins33);
    
PlayerTextDrawColor(playerid,pTextdrawSkins3, -1);
    
PlayerTextDrawSetOutline(playerid,pTextdrawSkins30);
    
PlayerTextDrawSetProportional(playerid,pTextdrawSkins31);
    
PlayerTextDrawSetShadow(playerid,pTextdrawSkins31);
    
PlayerTextDrawSetSelectable(playerid,pTextdrawSkins31); 
Reply
#2

I can see, Try adding "TextDrawTextSize", and verify it Y coordinate set to : 10 - 20.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)