[Ajuda] Problema em fazer textdraw selecionбvel
#6

Quote:
Originally Posted by IlanZ
Посмотреть сообщение
Ja que й TextDraw, e nгo PlayerTextDraw, Por quer nгo colocou as textdraw em OnGameModeInit?

No caso bota em OnGameModeInit

PHP код:
public OnGameModeInit()
{
    
TextdrawM0[playerid] = TextDrawCreate(126.250000113.583320"Lista_de_Minigames"); 
    
TextDrawLetterSize(TextdrawM0[playerid], 0.3000001.399999); 
    
TextDrawTextSize(TextdrawM0[playerid], 519.0000000.000000); 
    
TextDrawAlignment(TextdrawM0[playerid], 1); 
    
TextDrawColor(TextdrawM0[playerid], -1); 
    
TextDrawUseBox(TextdrawM0[playerid], 1); 
    
TextDrawBoxColor(TextdrawM0[playerid], 120); 
    
TextDrawSetShadow(TextdrawM0[playerid], 0); 
    
TextDrawSetOutline(TextdrawM0[playerid], 1); 
    
TextDrawBackgroundColor(TextdrawM0[playerid], 255); 
    
TextDrawFont(TextdrawM0[playerid], 1); 
    
TextDrawSetProportional(TextdrawM0[playerid], 1); 
    
TextDrawSetShadow(TextdrawM0[playerid], 0); 
    
// Aqui no final bota os TextDrawSetSelectable
    
TextDrawSetSelectable(TextdrawM1[playerid], 1);  
    
TextDrawSetSelectable(TextdrawM2[playerid], 1);  
    
TextDrawSetSelectable(TextdrawM3[playerid], 1);  
    
// ...
    
return 1;

E pra que botar MAX_PLAYERS Em textdraw global e nгo per players? (PlayerTextDraw)
E tira os [playerid] do codigo das textdraw, exemplo:

PHP код:
MostrarMinigames(playerid

    
TextDrawShowForPlayer(playeridTextdrawM0); 
    
TextDrawShowForPlayer(playeridTextdrawM1); 
    
TextDrawShowForPlayer(playeridTextdrawM2); 
    
TextDrawShowForPlayer(playeridTextdrawM3); 
    
TextDrawShowForPlayer(playeridTextdrawM4); 
    
TextDrawShowForPlayer(playeridTextdrawM5); 
    
TextDrawShowForPlayer(playeridTextdrawM6); 
    
TextDrawShowForPlayer(playeridTextdrawM7); 
    
TextDrawShowForPlayer(playeridTextdrawM8); 
    
hud_minigames[playerid] = true

SumirMinigames(playerid

    
TextDrawHideForPlayer(playeridTextdrawM0); 
    
TextDrawHideForPlayer(playeridTextdrawM1); 
    
TextDrawHideForPlayer(playeridTextdrawM2); 
    
TextDrawHideForPlayer(playeridTextdrawM3); 
    
TextDrawHideForPlayer(playeridTextdrawM4); 
    
TextDrawHideForPlayer(playeridTextdrawM5); 
    
TextDrawHideForPlayer(playeridTextdrawM6); 
    
TextDrawHideForPlayer(playeridTextdrawM7); 
    
TextDrawHideForPlayer(playeridTextdrawM8); 
    
hud_minigames[playerid] = false

public 
OnPlayerClickTextDraw(playeridText:clickedid

    if(
clickedid == TextdrawM1
    { 
        
ChatMsg(playerid, -1"Funcionou"); 
        
CancelSelectTextDraw(playerid); 
    } 
    if(
clickedid == TextdrawM2
    { 
        
ChatMsg(playerid, -1"Funcionou kkkj"); 
        
CancelSelectTextDraw(playerid); 
    } 
    if(
clickedid == TextdrawM3
    { 
        
ChatMsg(playerid, -1"Funcionou kkkj"); 
        
CancelSelectTextDraw(playerid); 
    } 
    
// ...
    
return 1

Eu jб vi o problema aqui, й assim, esta funcionando tudo normal sу que o botгo para clicar nгo ta centralizado exemplo, o textdraw estб normal sу que quando eu coloco o mouse em cima da letra nгo vai sу que lб em cima do textdraw bem na beira da pra clicar ou seja o botгo nгo estб do tamanho nem no local certo, eu jб vi isso sу que nгo me recordo qual funзгo faz isso, poderia me falar qual funзгo й para deixar o botгo centralizado de acordo com a textdraw?

http://imgur.com/a/csD1Z
Segue a print abaixo, a print nгo mostrou meu mouse mas saca sу ali naquele Race sу aparece quando eu passo o mouse lб na beirinha do quadrado do Race na parte de cima, se souber solucionar este bug fico grato!:
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)