public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == Celular[playerid][6])
{
TextDrawHideForPlayer(playerid, Celular[playerid][0]);
TextDrawHideForPlayer(playerid, Celular[playerid][1]);
TextDrawHideForPlayer(playerid, Celular[playerid][2]);
TextDrawHideForPlayer(playerid, Celular[playerid][3]);
TextDrawHideForPlayer(playerid, Celular[playerid][4]);
TextDrawHideForPlayer(playerid, Celular[playerid][5]);
TextDrawHideForPlayer(playerid, Celular[playerid][6]);
TextDrawHideForPlayer(playerid, Celular[playerid][7]);
TextDrawHideForPlayer(playerid, Celular[playerid][8]);
TextDrawHideForPlayer(playerid, Celular[playerid][9]);
TextDrawHideForPlayer(playerid, Celular[playerid][10]);
TextDrawHideForPlayer(playerid, Celular[playerid][11]);
TextDrawHideForPlayer(playerid, Celular[playerid][12]);
TextDrawHideForPlayer(playerid, Celular[playerid][13]);
TextDrawHideForPlayer(playerid, Celular[playerid][14]);
TextDrawHideForPlayer(playerid, Celular[playerid][15]);
TextDrawHideForPlayer(playerid, Celular[playerid][16]);
TextDrawHideForPlayer(playerid, Celular[playerid][17]);
TextDrawHideForPlayer(playerid, Celular[playerid][18]);
CancelSelectTextDraw(playerid);
return 1;
}
if(clickedid == Celular[playerid][12])
{
SendClientMessage(playerid, -1, "V1");
//Code
return 1;
}
if(clickedid == Celular[playerid][13])
{
SendClientMessage(playerid, -1, "2");
//Code
return 1;
}
if(clickedid == Celular[playerid][14])
{
SendClientMessage(playerid, -1, "3");
//Code
return 1;
}
if(clickedid == Celular[playerid][15])
{
SendClientMessage(playerid, -1, "4");
//Code
return 1;
}
if(clickedid == Celular[playerid][16])
{
SendClientMessage(playerid, -1, "5");
//Code
return 1;
}
if(clickedid == Celular[playerid][17])
{
SendClientMessage(playerid, -1, "6");
//Code
return 1;
}
if(clickedid == Celular[playerid][18])
{
SendClientMessage(playerid, -1, "7");
//Code
return 1;
}
return 1;
}
Quando vocк coloca o mouse nesses textos, muda a cor sу de um, ou de mais algum ao mesmo tempo?
|
Nгo precisa da BOX. Esse conceito й errado, por que a бrea clicбvel coincidentemente й a area da box. Pode criar o textdraw com ela, para vir certinho, depois remover a box do cуdigo.
|
Aconselho a colocar uma box em cada textdraw para controlar a аrea clicбvel.
|
Repito, basta apenas entender como funciona a funзгo TextDrawTextSize. Utilizar box serve apenas para deixar o cуdigo mais pesado se nгo for necessбrio.
|