selectableplayertextdraw issue
#1

I have 3 selectable textdraws and when I move my mouse it hovers over all of them and if I click on one it triggers Updates button.

I tried multiple TextSize but all of them trigger Updates :@

I don't have a fucking idea what size to use anyone know a good textsize

IMG(green color means that the mouse hovers over it, in this image I was hovering over accounts): http://imgur.com/a/Uh3cl


Code
PHP код:
loginscreen[9][playerid] = CreatePlayerTextDraw(playerid188.814071123.666648"Account");
    
PlayerTextDrawLetterSize(playeridloginscreen[9][playerid], 0.2935131.588333);
    
PlayerTextDrawAlignment(playeridloginscreen[9][playerid], 2);
    
PlayerTextDrawTextSize(playeridloginscreen[9][playerid], 820.0820.0);
    
PlayerTextDrawColor(playeridloginscreen[9][playerid], -1);
    
PlayerTextDrawSetShadow(playeridloginscreen[9][playerid], 0);
    
PlayerTextDrawSetOutline(playeridloginscreen[9][playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridloginscreen[9][playerid], 51);
    
PlayerTextDrawFont(playeridloginscreen[9][playerid], 2);
    
PlayerTextDrawSetProportional(playeridloginscreen[9][playerid], 1);
    
PlayerTextDrawSetSelectable(playeridloginscreen[9][playerid], 1);
    
loginscreen[10][playerid] = CreatePlayerTextDraw(playerid262.434936123.500007"ABOUT");
    
PlayerTextDrawLetterSize(playeridloginscreen[10][playerid], 0.2935131.588333);
    
PlayerTextDrawAlignment(playeridloginscreen[10][playerid], 2);
    
PlayerTextDrawColor(playeridloginscreen[10][playerid], -1);
    
PlayerTextDrawSetShadow(playeridloginscreen[10][playerid], 0);
    
PlayerTextDrawSetOutline(playeridloginscreen[10][playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridloginscreen[10][playerid], 51);
    
PlayerTextDrawFont(playeridloginscreen[10][playerid], 2);
    
PlayerTextDrawSetProportional(playeridloginscreen[10][playerid], 1);
    
PlayerTextDrawSetSelectable(playeridloginscreen[10][playerid], 1);
    
PlayerTextDrawTextSize(playeridloginscreen[9][playerid], 10.010.0);
    
loginscreen[11][playerid] = CreatePlayerTextDraw(playerid337.461547123.916679"UPDATES");
    
PlayerTextDrawLetterSize(playeridloginscreen[11][playerid], 0.2935131.588333);
    
PlayerTextDrawAlignment(playeridloginscreen[11][playerid], 2);
    
PlayerTextDrawColor(playeridloginscreen[11][playerid], -1);
    
PlayerTextDrawSetShadow(playeridloginscreen[11][playerid], 0);
    
PlayerTextDrawSetOutline(playeridloginscreen[11][playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridloginscreen[11][playerid], 51);
    
PlayerTextDrawFont(playeridloginscreen[11][playerid], 2);
    
PlayerTextDrawSetProportional(playeridloginscreen[11][playerid], 1);
    
PlayerTextDrawSetSelectable(playeridloginscreen[11][playerid], 1);
    
PlayerTextDrawTextSize(playeridloginscreen[9][playerid], 001.0000001.0000); 

PHP код:
if(_:playertextid != INVALID_TEXT_DRAW)
    {
        if(
playertextid == loginscreen[9][playerid])
        {
            if(
loginsc[playerid] == 1)
            {
                for(new 
1218i++)
                {
                    
PlayerTextDrawHide(playeridloginscreen[i][playerid]);
                }
            }
            else if(
loginsc[playerid] == 2)
            {
                for(new 
1823i++)
                {
                    
PlayerTextDrawHide(playeridloginscreen[i][playerid]);
                }
            }
            else if(
loginsc[playerid] == 3)
            {
                for(new 
2326i++)
                {
                    
PlayerTextDrawHide(playeridloginscreen[i][playerid]);
                }
            }
            for(new 
1218i++)
            {
                
PlayerTextDrawShow(playeridloginscreen[i][playerid]);
            }
            
loginsc[playerid] = 1;
        }
        if(
playertextid == loginscreen[10][playerid])
        {
            if(
loginsc[playerid] == 1)
            {
                for(new 
1218i++)
                {
                    
PlayerTextDrawHide(playeridloginscreen[i][playerid]);
                }
            }
            else if(
loginsc[playerid] == 2)
            {
                for(new 
1823i++)
                {
                    
PlayerTextDrawHide(playeridloginscreen[i][playerid]);
                }
            }
            else if(
loginsc[playerid] == 3)
            {
                for(new 
2326i++)
                {
                    
PlayerTextDrawHide(playeridloginscreen[i][playerid]);
                }
            }
            for(new 
1823i++)
            {
                
PlayerTextDrawShow(playeridloginscreen[i][playerid]);
            }
            
loginsc[playerid] = 2;
        }
        if(
playertextid == loginscreen[11][playerid])
        {
            if(
loginsc[playerid] == 1)
            {
                for(new 
1218i++)
                {
                    
PlayerTextDrawHide(playeridloginscreen[i][playerid]);
                }
            }
            else if(
loginsc[playerid] == 2)
            {
                for(new 
1823i++)
                {
                    
PlayerTextDrawHide(playeridloginscreen[i][playerid]);
                }
            }
            else if(
loginsc[playerid] == 3)
            {
                for(new 
2326i++)
                {
                    
PlayerTextDrawHide(playeridloginscreen[i][playerid]);
                }
            }
            for(new 
2326i++)
            {
                
PlayerTextDrawShow(playeridloginscreen[i][playerid]);
            }
            
loginsc[playerid] = 3;
        }
    } 
Reply
#2

In any case, this:
PHP код:
PlayerTextDrawTextSize(playeridloginscreen[9][playerid], 820.0820.0); 
Covers the entire screen because the canvas size you can draw on is only 640x480. Resize the image to that resolution in an image editor and then measure the pixels. So that ought to be width (x) 70 and height (y) 25. Also you forgot to change the 9 to 10 and 11 when you copied the line.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
In any case, this:
PHP код:
PlayerTextDrawTextSize(playeridloginscreen[9][playerid], 820.0820.0); 
Covers the entire screen because the canvas size you can draw on is only 640x480. Resize the image to that resolution in an image editor and then measure the pixels. So that ought to be width (x) 70 and height (y) 25. Also you forgot to change the 9 to 10 and 11 when you copied the line.
Oh damn.. that was the issue.. I forgot to change that 9

God bless you, thanks alot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)