17/03/2022 10:11
Fiz do jeito que sei, tenta dessa forma:
Código PHP:
//Adicione a variavel antes de OnPlayerConnect
new PlayerText:Menu_SKIN[MAX_PLAYERS][23];
public OnPlayerConnect(playerid)//Carregar as textdraw aqui
{
Menu_SKIN[playerid][0] = CreatePlayerTextDraw(playerid, 91.999908, 141.466644, "box");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][0], 0.000000, 29.300003);
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][0], 570.966308, 0.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][0], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][0], -1);
PlayerTextDrawUseBox(playerid, Menu_SKIN[playerid][0], 1);
PlayerTextDrawBoxColor(playerid, Menu_SKIN[playerid][0], 16777139);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][0], -225);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][0], 1);
Menu_SKIN[playerid][1] = CreatePlayerTextDraw(playerid, 492.000000, 148.933288, "box");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][1], 0.000000, 1.900000);
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][1], 559.000000, 0.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][1], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][1], -16776961);
PlayerTextDrawUseBox(playerid, Menu_SKIN[playerid][1], 1);
PlayerTextDrawBoxColor(playerid, Menu_SKIN[playerid][1], -16776961);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][1], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][1], 255);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][1], 1);
Menu_SKIN[playerid][2] = CreatePlayerTextDraw(playerid, 493.500030, 148.766571, "fechar");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][2], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][2], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][2], 255);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][2], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][2], 255);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][2], 2);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][2], 1);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][2], true);
Menu_SKIN[playerid][3] = CreatePlayerTextDraw(playerid, 98.299690, 386.999755, "box");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][3], 0.000000, 1.388007);
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][3], 176.901336, 0.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][3], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][3], -1);
PlayerTextDrawUseBox(playerid, Menu_SKIN[playerid][3], 1);
PlayerTextDrawBoxColor(playerid, Menu_SKIN[playerid][3], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][3], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][3], 255);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][3], 1);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][3], 1);
Menu_SKIN[playerid][4] = CreatePlayerTextDraw(playerid, 96.199676, 385.099884, "anterior");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][4], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][4], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][4], 255);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][4], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][4], 255);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][4], 2);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][4], 1);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][4], true);
Menu_SKIN[playerid][5] = CreatePlayerTextDraw(playerid, 482.200012, 387.632873, "box");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][5], 0.000000, 1.299999);
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][5], 563.199951, 0.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][5], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][5], -1);
PlayerTextDrawUseBox(playerid, Menu_SKIN[playerid][5], 1);
PlayerTextDrawBoxColor(playerid, Menu_SKIN[playerid][5], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][5], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][5], 255);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][5], 1);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][5], 1);
Menu_SKIN[playerid][6] = CreatePlayerTextDraw(playerid, 487.900177, 385.066650, "proximo");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][6], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][6], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][6], 255);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][6], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][6], 255);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][6], 2);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][6], 1);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][6], true);
Menu_SKIN[playerid][7] = CreatePlayerTextDraw(playerid, 490.000000, 179.266647, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][7], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][7], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][7], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][7], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][7], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][7], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][7], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][7], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][7], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][7], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][8] = CreatePlayerTextDraw(playerid, 413.000000, 179.233352, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][8], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][8], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][8], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][8], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][8], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][8], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][8], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][8], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][8], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][8], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][9] = CreatePlayerTextDraw(playerid, 102.599594, 146.133285, "escolha_uma_skin");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][9], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][9], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][9], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][9], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][9], 255);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][9], 2);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][9], 1);
Menu_SKIN[playerid][10] = CreatePlayerTextDraw(playerid, 335.500091, 179.766662, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][10], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][10], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][10], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][10], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][10], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][10], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][10], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][10], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][10], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][10], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][11] = CreatePlayerTextDraw(playerid, 258.199890, 179.899932, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][11], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][11], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][11], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][11], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][11], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][11], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][11], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][11], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][11], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][11], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][12] = CreatePlayerTextDraw(playerid, 180.400085, 179.899948, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][12], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][12], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][12], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][12], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][12], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][12], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][12], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][12], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][12], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][12], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][13] = CreatePlayerTextDraw(playerid, 102.800094, 179.899948, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][13], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][13], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][13], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][13], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][13], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][13], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][13], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][13], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][13], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][13], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][14] = CreatePlayerTextDraw(playerid, 102.800109, 280.466705, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][14], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][14], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][14], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][14], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][14], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][14], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][14], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][14], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][14], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][14], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][15] = CreatePlayerTextDraw(playerid, 180.502929, 280.466705, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][15], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][15], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][15], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][15], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][15], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][15], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][15], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][15], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][15], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][15], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][16] = CreatePlayerTextDraw(playerid, 259.007720, 280.466705, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][16], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][16], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][16], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][16], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][16], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][16], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][16], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][16], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][16], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][16], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][17] = CreatePlayerTextDraw(playerid, 335.912414, 280.466705, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][17], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][17], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][17], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][17], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][17], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][17], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][17], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][17], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][17], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][17], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][18] = CreatePlayerTextDraw(playerid, 412.817108, 280.466705, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][18], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][18], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][18], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][18], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][18], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][18], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][18], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][18], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][18], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][18], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][19] = CreatePlayerTextDraw(playerid, 489.421783, 280.466705, "");
PlayerTextDrawTextSize(playerid, Menu_SKIN[playerid][19], 69.000000, 93.000000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][19], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][19], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][19], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][19], -1);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][19], 5);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][19], 0);
PlayerTextDrawSetSelectable(playerid, Menu_SKIN[playerid][19], true);
PlayerTextDrawSetPreviewModel(playerid, Menu_SKIN[playerid][19], 26);
PlayerTextDrawSetPreviewRot(playerid, Menu_SKIN[playerid][19], 0.000000, 0.000000, 0.000000, 1.000000);
Menu_SKIN[playerid][20] = CreatePlayerTextDraw(playerid, 321.300384, 385.066436, "1/1");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][20], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][20], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][20], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][20], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][20], 255);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][20], 1);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][20], 1);
Menu_SKIN[playerid][21] = CreatePlayerTextDraw(playerid, 189.299957, 385.999938, "<<<<<<<<<<<<<");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][21], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][21], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][21], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][21], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][21], 255);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][21], 1);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][21], 1);
Menu_SKIN[playerid][22] = CreatePlayerTextDraw(playerid, 350.000000, 385.600219, ">>>>>>>>>>>>");
PlayerTextDrawLetterSize(playerid, Menu_SKIN[playerid][22], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, Menu_SKIN[playerid][22], 1);
PlayerTextDrawColor(playerid, Menu_SKIN[playerid][22], -1);
PlayerTextDrawSetShadow(playerid, Menu_SKIN[playerid][22], 0);
PlayerTextDrawBackgroundColor(playerid, Menu_SKIN[playerid][22], 255);
PlayerTextDrawFont(playerid, Menu_SKIN[playerid][22], 1);
PlayerTextDrawSetProportional(playerid, Menu_SKIN[playerid][22], 1);
return 1;
}
CMD:comprarskin(playerid)
{
for(new gt = 0; gt < 23; gt++)PlayerTextDrawShow(playerid,Menu_SKIN[playerid][gt]);//Carregar as textdraws
SelectTextDraw(playerid, Verde);// para aparecer o mouse
return 1;
}
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == Menu_SKIN[playerid][2])//Fechar e destruir as textdraws
{
for(new gt = 0; gt < 23; gt++)PlayerTextDrawHide(playerid,Menu_SKIN[playerid][gt]);//Fechar as textdraws
SendClientMessage(playerid, Vermelho, "Teste");
}
return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == Text:INVALID_TEXT_DRAW)//Caso o clique seja inválido será destruido
{
for(new gt = 0; gt < 23; gt++)PlayerTextDrawDestroy(playerid, Menu_SKIN[playerid][gt]);//Destruir as textdraws
}
return 1;
}
Discord:https://discord.gg/Vg5HMqgdP9