[Ajuda] TextDraw Clicaveis
#1

Alguйm poderia me ajudar, Pois nгo consigo fazer com que elas aparece no inicio. (Й Uma Tela de Login)
Код:
new Text:TextLogin0[6];
new PlayerText:TextLogin1[4][MAX_PLAYERS];
OnGameModeInit:
   TextLogin0[0] = TextDrawCreate(2.000000, 1.500000, "usebox");
	TextDrawLetterSize(TextLogin0[0], 0.000000, 16.794445);
	TextDrawTextSize(TextLogin0[0], 637.444458, 0.000000);
	TextDrawAlignment(TextLogin0[0], 1);
	TextDrawColor(TextLogin0[0], 0);
	TextDrawUseBox(TextLogin0[0], true);
	TextDrawBoxColor(TextLogin0[0], 102);
	TextDrawSetShadow(TextLogin0[0], 0);
	TextDrawSetOutline(TextLogin0[0], 0);
	TextDrawFont(TextLogin0[0], 0);

	TextLogin0[1] = TextDrawCreate(2.000000, 320.907409, "usebox");
	TextDrawLetterSize(TextLogin0[1], 0.000000, 13.913785);
	TextDrawTextSize(TextLogin0[1], 637.444458, 0.000000);
	TextDrawAlignment(TextLogin0[1], 1);
	TextDrawColor(TextLogin0[1], 0);
	TextDrawUseBox(TextLogin0[1], true);
	TextDrawBoxColor(TextLogin0[1], 102);
	TextDrawSetShadow(TextLogin0[1], 0);
	TextDrawSetOutline(TextLogin0[1], 0);
	TextDrawFont(TextLogin0[1], 0);

	TextLogin0[2] = TextDrawCreate(182.777847, 6.740743, "Cidade Virtual");
	TextDrawLetterSize(TextLogin0[2], 0.927222, 6.349626);
	TextDrawAlignment(TextLogin0[2], 1);
	TextDrawColor(TextLogin0[2], 16777215);
	TextDrawSetShadow(TextLogin0[2], 0);
	TextDrawSetOutline(TextLogin0[2], 1);
	TextDrawBackgroundColor(TextLogin0[2], 51);
	TextDrawFont(TextLogin0[2], 1);
	TextDrawSetProportional(TextLogin0[2], 1);

	TextLogin0[3] = TextDrawCreate(368.888702, 56.518501, "V1.0");
	TextDrawLetterSize(TextLogin0[3], 0.449999, 1.600000);
	TextDrawAlignment(TextLogin0[3], 1);
	TextDrawColor(TextLogin0[3], -1);
	TextDrawSetShadow(TextLogin0[3], 0);
	TextDrawSetOutline(TextLogin0[3], 1);
	TextDrawBackgroundColor(TextLogin0[3], 51);
	TextDrawFont(TextLogin0[3], 1);
	TextDrawSetProportional(TextLogin0[3], 1);

	TextLogin0[4] = TextDrawCreate(203.333297, 66.370353, "www.cidadevirtual.com.br");
	TextDrawLetterSize(TextLogin0[4], 0.449999, 1.600000);
	TextDrawAlignment(TextLogin0[4], 1);
	TextDrawColor(TextLogin0[4], -1);
	TextDrawSetShadow(TextLogin0[4], 0);
	TextDrawSetOutline(TextLogin0[4], 1);
	TextDrawBackgroundColor(TextLogin0[4], 51);
	TextDrawFont(TextLogin0[4], 1);
	TextDrawSetProportional(TextLogin0[4], 1);

	TextLogin0[5] = TextDrawCreate(150.555603, 92.296318, "Melhor Qualidade do que Quantidade!");
	TextDrawLetterSize(TextLogin0[5], 0.449999, 1.600000);
	TextDrawAlignment(TextLogin0[5], 1);
	TextDrawColor(TextLogin0[5], -1);
	TextDrawSetShadow(TextLogin0[5], 0);
	TextDrawSetOutline(TextLogin0[5], 1);
	TextDrawBackgroundColor(TextLogin0[5], 51);
	TextDrawFont(TextLogin0[5], 1);
	TextDrawSetProportional(TextLogin0[5], 1);
}
CarregarTextPlayer(playerid)
{
	TextLogin1[playerid][0] = CreatePlayerTextDraw(playerid, 121.666679, 141.037078, "Login");
	PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][0], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, TextLogin1[playerid][0], 1);
	PlayerTextDrawColor(playerid, TextLogin1[playerid][0], -1);
	PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][0], 0);
	PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][0], 1);
	PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][0], 51);
	PlayerTextDrawFont(playerid, TextLogin1[playerid][0], 1);
	PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][0], 1);

	TextLogin1[playerid][1] = CreatePlayerTextDraw(playerid, 207.777770, 141.037017, "Registro");
	PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][1], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, TextLogin1[playerid][1], 1);
	PlayerTextDrawColor(playerid, TextLogin1[playerid][1], -1);
	PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][1], 0);
	PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][1], 1);
	PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][1], 51);
	PlayerTextDrawFont(playerid, TextLogin1[playerid][1], 1);
	PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][1], 1);

	TextLogin1[playerid][2] = CreatePlayerTextDraw(playerid, 311.666778, 141.555511, "Creditos");
	PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][2], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, TextLogin1[playerid][2], 1);
	PlayerTextDrawColor(playerid, TextLogin1[playerid][2], -1);
	PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][2], 0);
	PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][2], 1);
	PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][2], 51);
	PlayerTextDrawFont(playerid, TextLogin1[playerid][2], 1);
	PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][2], 1);

	TextLogin1[playerid][3] = CreatePlayerTextDraw(playerid, 430.000091, 141.037002, "Sair");
	PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][3], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, TextLogin1[playerid][3], 1);
	PlayerTextDrawColor(playerid, TextLogin1[playerid][3], -1);
	PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][3], 0);
	PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][3], 1);
	PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][3], 51);
	PlayerTextDrawFont(playerid, TextLogin1[playerid][3], 1);
PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][3], 1);

for(new a; a < sizeof(TextLogin1[playerid]); ++a) PlayerTextDrawSetSelectable(playerid, PlayerText:TextLogin1[playerid][a], true);
	return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
	if(clickedid == Text: INVALID_TEXT_DRAW)
	{
	    SetlectTextDraw(playerid,0x35F344F);
	}
       return 1;
}
OnPlayerConnect:

	CarregarTextPlayer(playerid);
	SelectTextDraw(playerid, 0x35F344F);
	for(new i = 0; i < sizeof(TextLogin0); i++) TextDrawShowForPlayer(playerid, TextLogin0[i]);
	for(new i = 0; i < sizeof(TextLogin1[playerid]) -1; i++) PlayerTextDrawShow(playerid, PlayerText:TextLogin1[playerid][i]);
ERROS: error 001: expected token: "]", but found "-identifier-"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Linha do Erro:
Код:
for(new a; a < sizeof(TextLogin1[playerid]); ++a) PlayerTextDrawSetSelectable(playerid, PlayerText:TextLogin1[playerid][a], true);
Reply
#2

Nas textdraw's vocк coloca isso:
PHP код:
TextDrawSetSelectable(TextLogin1[playerid][0], true);
TextDrawSetSelectable(TextLogin1[playerid][1], true);
TextDrawSetSelectable(TextLogin1[playerid][2], true);
TextDrawSetSelectable(TextLogin1[playerid][3], true); 
e em onplayerconnect isso:
PHP код:
SelectTextDraw(playerid, 0x00FF00FF);//No lugar do 0x00FF00FF vocк coloca sua cor. 
Se o ajudei dк Rep+.
Reply
#3

PHP код:
new Text:TextLogin0[6];
new 
PlayerText:TextLogin1[4][MAX_PLAYERS];
OnGameModeInit:
    
TextLogin0[0] = TextDrawCreate(2.000000, 1.500000, "usebox");
    
TextDrawLetterSize(TextLogin0[0], 0.000000, 16.794445);
    
TextDrawTextSize(TextLogin0[0], 637.444458, 0.000000);
    
TextDrawAlignment(TextLogin0[0], 1);
    
TextDrawColor(TextLogin0[0], 0);
    
TextDrawUseBox(TextLogin0[0], true);
    
TextDrawBoxColor(TextLogin0[0], 102);
    
TextDrawSetShadow(TextLogin0[0], 0);
    
TextDrawSetOutline(TextLogin0[0], 0);
    
TextDrawFont(TextLogin0[0], 0);
    
TextLogin0[1] = TextDrawCreate(2.000000, 320.907409, "usebox");
    
TextDrawLetterSize(TextLogin0[1], 0.000000, 13.913785);
    
TextDrawTextSize(TextLogin0[1], 637.444458, 0.000000);
    
TextDrawAlignment(TextLogin0[1], 1);
    
TextDrawColor(TextLogin0[1], 0);
    
TextDrawUseBox(TextLogin0[1], true);
    
TextDrawBoxColor(TextLogin0[1], 102);
    
TextDrawSetShadow(TextLogin0[1], 0);
    
TextDrawSetOutline(TextLogin0[1], 0);
    
TextDrawFont(TextLogin0[1], 0);
    
TextLogin0[2] = TextDrawCreate(182.777847, 6.740743, "Cidade Virtual");
    
TextDrawLetterSize(TextLogin0[2], 0.927222, 6.349626);
    
TextDrawAlignment(TextLogin0[2], 1);
    
TextDrawColor(TextLogin0[2], 16777215);
    
TextDrawSetShadow(TextLogin0[2], 0);
    
TextDrawSetOutline(TextLogin0[2], 1);
    
TextDrawBackgroundColor(TextLogin0[2], 51);
    
TextDrawFont(TextLogin0[2], 1);
    
TextDrawSetProportional(TextLogin0[2], 1);
    
TextLogin0[3] = TextDrawCreate(368.888702, 56.518501, "V1.0");
    
TextDrawLetterSize(TextLogin0[3], 0.449999, 1.600000);
    
TextDrawAlignment(TextLogin0[3], 1);
    
TextDrawColor(TextLogin0[3], -1);
    
TextDrawSetShadow(TextLogin0[3], 0);
    
TextDrawSetOutline(TextLogin0[3], 1);
    
TextDrawBackgroundColor(TextLogin0[3], 51);
    
TextDrawFont(TextLogin0[3], 1);
    
TextDrawSetProportional(TextLogin0[3], 1);
    
TextLogin0[4] = TextDrawCreate(203.333297, 66.370353, "www.cidadevirtual.com.br");
    
TextDrawLetterSize(TextLogin0[4], 0.449999, 1.600000);
    
TextDrawAlignment(TextLogin0[4], 1);
    
TextDrawColor(TextLogin0[4], -1);
    
TextDrawSetShadow(TextLogin0[4], 0);
    
TextDrawSetOutline(TextLogin0[4], 1);
    
TextDrawBackgroundColor(TextLogin0[4], 51);
    
TextDrawFont(TextLogin0[4], 1);
    
TextDrawSetProportional(TextLogin0[4], 1);
    
TextLogin0[5] = TextDrawCreate(150.555603, 92.296318, "Melhor Qualidade do que Quantidade!");
    
TextDrawLetterSize(TextLogin0[5], 0.449999, 1.600000);
    
TextDrawAlignment(TextLogin0[5], 1);
    
TextDrawColor(TextLogin0[5], -1);
    
TextDrawSetShadow(TextLogin0[5], 0);
    
TextDrawSetOutline(TextLogin0[5], 1);
    
TextDrawBackgroundColor(TextLogin0[5], 51);
    
TextDrawFont(TextLogin0[5], 1);
    
TextDrawSetProportional(TextLogin0[5], 1);
}
CarregarTextPlayer(playerid)
{
    
TextLogin1[playerid][0] = CreatePlayerTextDraw(playerid, 121.666679, 141.037078, "Login");
    
PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][0], 0.449999, 1.600000);
    
PlayerTextDrawAlignment(playerid, TextLogin1[playerid][0], 1);
    
PlayerTextDrawColor(playerid, TextLogin1[playerid][0], -1);
    
PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][0], 0);
    
PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][0], 1);
    
PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][0], 51);
    
PlayerTextDrawFont(playerid, TextLogin1[playerid][0], 1);
    
PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][0], 1);
    
TextDrawSetSelectable(playerid, TextLogin1[playerid][0], true);
    
TextLogin1[playerid][1] = CreatePlayerTextDraw(playerid, 207.777770, 141.037017, "Registro");
    
PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][1], 0.449999, 1.600000);
    
PlayerTextDrawAlignment(playerid, TextLogin1[playerid][1], 1);
    
PlayerTextDrawColor(playerid, TextLogin1[playerid][1], -1);
    
PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][1], 0);
    
PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][1], 1);
    
PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][1], 51);
    
PlayerTextDrawFont(playerid, TextLogin1[playerid][1], 1);
    
PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][1], 1);
    
TextDrawSetSelectable(playerid, TextLogin1[playerid][1], true);
    
TextLogin1[playerid][2] = CreatePlayerTextDraw(playerid, 311.666778, 141.555511, "Creditos");
    
PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][2], 0.449999, 1.600000);
    
PlayerTextDrawAlignment(playerid, TextLogin1[playerid][2], 1);
    
PlayerTextDrawColor(playerid, TextLogin1[playerid][2], -1);
    
PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][2], 0);
    
PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][2], 1);
    
PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][2], 51);
    
PlayerTextDrawFont(playerid, TextLogin1[playerid][2], 1);
    
PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][2], 1);
    
TextDrawSetSelectable(playerid, TextLogin1[playerid][2], true);
    
TextLogin1[playerid][3] = CreatePlayerTextDraw(playerid, 430.000091, 141.037002, "Sair");
    
PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][3], 0.449999, 1.600000);
    
PlayerTextDrawAlignment(playerid, TextLogin1[playerid][3], 1);
    
PlayerTextDrawColor(playerid, TextLogin1[playerid][3], -1);
    
PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][3], 0);
    
PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][3], 1);
    
PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][3], 51);
    
PlayerTextDrawFont(playerid, TextLogin1[playerid][3], 1);
    
PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][3], 1);
    
TextDrawSetSelectable(playerid, TextLogin1[playerid][3], true);
    
SelectTextDraw(playerid, 0xFFFFFFFF);
    for(new 
i, j <sizeof(TextLogin0); i < j; i ++)
        
TextDrawShowForPlayer(playerid, TextLogin0[i]);
    for(new 
i, j = sizeof(TextLogin1[]); i < j; i ++)
        
PlayerTextDrawShow(playerid, TextLogin1[playerid][i]);
}
public 
OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(
clickedid == Text: INVALID_TEXT_DRAW)
    {
        
SetlectTextDraw(playerid, 0x35F344F);
    }
       return 
1;
}
OnPlayerConnect:
    
CarregarTextPlayer(playerid); 
Ver se vai da certo aн
Reply
#4

O Erro persiste, Nгo consigo fazer com que as TextDraw's aparece assim que o player Logar.
Reply
#5

vou da um exemplo



public OnPlayerRequestClass
{
MostrarLogin(playerid);//mostra as textdraw de login



public OnPlayerSpawn(playerid)
{
TirarLogin(playerid);//tira tela de login apos Spawnar no servidor





forward MostrarLogin(playerid);
public MostrarLogin(playerid)
{
TextDrawShowForPlayer(playerid, TDEditor_TD[0]);
TextDrawShowForPlayer(playerid, TDEditor_TD[1]);
TextDrawShowForPlayer(playerid, TDEditor_TD[2]);
TextDrawShowForPlayer(playerid, TDEditor_TD[3]);
TextDrawShowForPlayer(playerid, TDEditor_TD[4]);
TextDrawShowForPlayer(playerid, TDEditor_TD[5]);
TextDrawShowForPlayer(playerid, TDEditor_TD[6]);
TextDrawShowForPlayer(playerid, TDEditor_TD[7]);
TextDrawShowForPlayer(playerid, TDEditor_TD[8]);
TextDrawShowForPlayer(playerid, TDEditor_TD[9]);
TextDrawShowForPlayer(playerid, TDEditor_TD[10]);
TextDrawShowForPlayer(playerid, TDEditor_TD[11]);
TextDrawShowForPlayer(playerid, TDEditor_TD[12]);
TextDrawShowForPlayer(playerid, TDEditor_TD[13]);
TextDrawShowForPlayer(playerid, TDEditor_TD[14]);
TextDrawShowForPlayer(playerid, TDEditor_TD[15]);
TextDrawShowForPlayer(playerid, TDEditor_TD[16]);
TextDrawShowForPlayer(playerid, TDEditor_TD[17]);
TextDrawShowForPlayer(playerid, TDEditor_TD[18]);
TextDrawShowForPlayer(playerid, TDEditor_TD[19]);
return 1;
}

forward TirarLogin(playerid);
public TirarLogin(playerid)
{
TextDrawHideForPlayer(playerid, TDEditor_TD[0]);
TextDrawHideForPlayer(playerid, TDEditor_TD[1]);
TextDrawHideForPlayer(playerid, TDEditor_TD[2]);
TextDrawHideForPlayer(playerid, TDEditor_TD[3]);
TextDrawHideForPlayer(playerid, TDEditor_TD[4]);
TextDrawHideForPlayer(playerid, TDEditor_TD[5]);
TextDrawHideForPlayer(playerid, TDEditor_TD[6]);
TextDrawHideForPlayer(playerid, TDEditor_TD[7]);
TextDrawHideForPlayer(playerid, TDEditor_TD[8]);
TextDrawHideForPlayer(playerid, TDEditor_TD[9]);
TextDrawHideForPlayer(playerid, TDEditor_TD[10]);
TextDrawHideForPlayer(playerid, TDEditor_TD[11]);
TextDrawHideForPlayer(playerid, TDEditor_TD[12]);
TextDrawHideForPlayer(playerid, TDEditor_TD[13]);
TextDrawHideForPlayer(playerid, TDEditor_TD[14]);
TextDrawHideForPlayer(playerid, TDEditor_TD[15]);
TextDrawHideForPlayer(playerid, TDEditor_TD[16]);
TextDrawHideForPlayer(playerid, TDEditor_TD[17]);
TextDrawHideForPlayer(playerid, TDEditor_TD[18]);
TextDrawHideForPlayer(playerid, TDEditor_TD[19]);
CancelSelectTextDraw(playerid);
return 1;
}



Apenas um exemplo para v se consegue ter uma ideia de como se fazer! sem criticas pfv


so quiz ajudar do jeito q criei a minha
Reply
#6

Quote:
Originally Posted by BuDweiSeR
Посмотреть сообщение
Alguйm poderia me ajudar, Pois nгo consigo fazer com que elas aparece no inicio. (Й Uma Tela de Login)
Код:
new Text:TextLogin0[6];
new PlayerText:TextLogin1[4][MAX_PLAYERS];
OnGameModeInit:
   TextLogin0[0] = TextDrawCreate(2.000000, 1.500000, "usebox");
	TextDrawLetterSize(TextLogin0[0], 0.000000, 16.794445);
	TextDrawTextSize(TextLogin0[0], 637.444458, 0.000000);
	TextDrawAlignment(TextLogin0[0], 1);
	TextDrawColor(TextLogin0[0], 0);
	TextDrawUseBox(TextLogin0[0], true);
	TextDrawBoxColor(TextLogin0[0], 102);
	TextDrawSetShadow(TextLogin0[0], 0);
	TextDrawSetOutline(TextLogin0[0], 0);
	TextDrawFont(TextLogin0[0], 0);

	TextLogin0[1] = TextDrawCreate(2.000000, 320.907409, "usebox");
	TextDrawLetterSize(TextLogin0[1], 0.000000, 13.913785);
	TextDrawTextSize(TextLogin0[1], 637.444458, 0.000000);
	TextDrawAlignment(TextLogin0[1], 1);
	TextDrawColor(TextLogin0[1], 0);
	TextDrawUseBox(TextLogin0[1], true);
	TextDrawBoxColor(TextLogin0[1], 102);
	TextDrawSetShadow(TextLogin0[1], 0);
	TextDrawSetOutline(TextLogin0[1], 0);
	TextDrawFont(TextLogin0[1], 0);

	TextLogin0[2] = TextDrawCreate(182.777847, 6.740743, "Cidade Virtual");
	TextDrawLetterSize(TextLogin0[2], 0.927222, 6.349626);
	TextDrawAlignment(TextLogin0[2], 1);
	TextDrawColor(TextLogin0[2], 16777215);
	TextDrawSetShadow(TextLogin0[2], 0);
	TextDrawSetOutline(TextLogin0[2], 1);
	TextDrawBackgroundColor(TextLogin0[2], 51);
	TextDrawFont(TextLogin0[2], 1);
	TextDrawSetProportional(TextLogin0[2], 1);

	TextLogin0[3] = TextDrawCreate(368.888702, 56.518501, "V1.0");
	TextDrawLetterSize(TextLogin0[3], 0.449999, 1.600000);
	TextDrawAlignment(TextLogin0[3], 1);
	TextDrawColor(TextLogin0[3], -1);
	TextDrawSetShadow(TextLogin0[3], 0);
	TextDrawSetOutline(TextLogin0[3], 1);
	TextDrawBackgroundColor(TextLogin0[3], 51);
	TextDrawFont(TextLogin0[3], 1);
	TextDrawSetProportional(TextLogin0[3], 1);

	TextLogin0[4] = TextDrawCreate(203.333297, 66.370353, "www.cidadevirtual.com.br");
	TextDrawLetterSize(TextLogin0[4], 0.449999, 1.600000);
	TextDrawAlignment(TextLogin0[4], 1);
	TextDrawColor(TextLogin0[4], -1);
	TextDrawSetShadow(TextLogin0[4], 0);
	TextDrawSetOutline(TextLogin0[4], 1);
	TextDrawBackgroundColor(TextLogin0[4], 51);
	TextDrawFont(TextLogin0[4], 1);
	TextDrawSetProportional(TextLogin0[4], 1);

	TextLogin0[5] = TextDrawCreate(150.555603, 92.296318, "Melhor Qualidade do que Quantidade!");
	TextDrawLetterSize(TextLogin0[5], 0.449999, 1.600000);
	TextDrawAlignment(TextLogin0[5], 1);
	TextDrawColor(TextLogin0[5], -1);
	TextDrawSetShadow(TextLogin0[5], 0);
	TextDrawSetOutline(TextLogin0[5], 1);
	TextDrawBackgroundColor(TextLogin0[5], 51);
	TextDrawFont(TextLogin0[5], 1);
	TextDrawSetProportional(TextLogin0[5], 1);
}
CarregarTextPlayer(playerid)
{
	TextLogin1[playerid][0] = CreatePlayerTextDraw(playerid, 121.666679, 141.037078, "Login");
	PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][0], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, TextLogin1[playerid][0], 1);
	PlayerTextDrawColor(playerid, TextLogin1[playerid][0], -1);
	PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][0], 0);
	PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][0], 1);
	PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][0], 51);
	PlayerTextDrawFont(playerid, TextLogin1[playerid][0], 1);
	PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][0], 1);

	TextLogin1[playerid][1] = CreatePlayerTextDraw(playerid, 207.777770, 141.037017, "Registro");
	PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][1], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, TextLogin1[playerid][1], 1);
	PlayerTextDrawColor(playerid, TextLogin1[playerid][1], -1);
	PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][1], 0);
	PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][1], 1);
	PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][1], 51);
	PlayerTextDrawFont(playerid, TextLogin1[playerid][1], 1);
	PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][1], 1);

	TextLogin1[playerid][2] = CreatePlayerTextDraw(playerid, 311.666778, 141.555511, "Creditos");
	PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][2], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, TextLogin1[playerid][2], 1);
	PlayerTextDrawColor(playerid, TextLogin1[playerid][2], -1);
	PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][2], 0);
	PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][2], 1);
	PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][2], 51);
	PlayerTextDrawFont(playerid, TextLogin1[playerid][2], 1);
	PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][2], 1);

	TextLogin1[playerid][3] = CreatePlayerTextDraw(playerid, 430.000091, 141.037002, "Sair");
	PlayerTextDrawLetterSize(playerid, TextLogin1[playerid][3], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, TextLogin1[playerid][3], 1);
	PlayerTextDrawColor(playerid, TextLogin1[playerid][3], -1);
	PlayerTextDrawSetShadow(playerid, TextLogin1[playerid][3], 0);
	PlayerTextDrawSetOutline(playerid, TextLogin1[playerid][3], 1);
	PlayerTextDrawBackgroundColor(playerid, TextLogin1[playerid][3], 51);
	PlayerTextDrawFont(playerid, TextLogin1[playerid][3], 1);
PlayerTextDrawSetProportional(playerid, TextLogin1[playerid][3], 1);

for(new a; a < sizeof(TextLogin1[playerid]); ++a) PlayerTextDrawSetSelectable(playerid, PlayerText:TextLogin1[playerid][a], true);
	return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
	if(clickedid == Text: INVALID_TEXT_DRAW)
	{
	    SetlectTextDraw(playerid,0x35F344F);
	}
       return 1;
}
OnPlayerConnect:

	CarregarTextPlayer(playerid);
	SelectTextDraw(playerid, 0x35F344F);
	for(new i = 0; i < sizeof(TextLogin0); i++) TextDrawShowForPlayer(playerid, TextLogin0[i]);
	for(new i = 0; i < sizeof(TextLogin1[playerid]) -1; i++) PlayerTextDrawShow(playerid, PlayerText:TextLogin1[playerid][i]);
ERROS: error 001: expected token: "]", but found "-identifier-"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Linha do Erro:
Код:
for(new a; a < sizeof(TextLogin1[playerid]); ++a) PlayerTextDrawSetSelectable(playerid, PlayerText:TextLogin1[playerid][a], true);
A mano desculpa mesmo eu nгo tinha reparado nesse erro mlz.
PHP код:
for(new a = 0; a < 6; a++) PlayerTextDrawSetSelectable(playerid, PlayerText:TextLogin1[playerid][a], true); 
Reply
#7

Se nгo me engano, as textdraws clicбveis nгo funcionam na tela de login padrгo do SA-MP (caso vocк colocar no OnPlayerRequestClass). Vocк tem que usar a funзгo SetSpawnInfo no OnPlayerConnect, e no OnPlayerRequestSpawn usar a funзгo SpawnPlayer pra forзar o player spawnar, e dai vocк cria a sua prуpria tela de login personalizada com os textdraws clicбveis.
Reply
#8

Como assim poderia ser mais claro, sou Novato em Programaзгo...Tentei fazer aqui da maneira que vocк falou mas nгo consegui.
Estou estudando sobre TextDraws mas tenho um pouco de dificuldade.
Reply
#9

Alguйm poderia ajudar?
Reply
#10

estude como esse funciona

https://sampforum.blast.hk/showthread.php?tid=560688

cria um textdraw coloca ele como clicavel
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(
clickedid == Nomedotextdraw)
    {
     
//Funзхes ao player clicar na textdraw 
     
return 1;
    }
    return 
0;
} 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)