PHP код:
#define COLORMENU 1111
PHP код:
CMD:highlight(playerid, params[])
{
ShowPlayerDialog(playerid, COLORMENU, DIALOG_STYLE_LIST, "Color Menu", "Blue\nBlack\nRed\nOrange\nPink\nPurple\nGreen\nYellow\nWhite", "Select", "Cancel");
}
Use this under OnPlayerDialogResponse callback.
PHP код:
if(dialogid == COLORMENU)
{
if(response)
{
if(listitem == 0)
{
SetPlayerColor(playerid, 0x2641FEAA);
SendClientMessage(playerid, 0x2641FEAA, "Your color has been set to Blue!");
}
if(listitem == 1)
{
SetPlayerColor(playerid, 0x000000AA);
SendClientMessage(playerid, 0x000000AA, "Your color has been set to Black!");
}
if(listitem == 2)
{
SetPlayerColor(playerid, 0xAA3333AA);
SendClientMessage(playerid, 0xAA3333AA, "Your color has been set to Red!");
}
if(listitem == 3)
{
SetPlayerColor(playerid, 0xFF800000);
SendClientMessage(playerid, 0xFF800000, "Your color has been set to Orange!");
}
if(listitem == 4)
{
SetPlayerColor(playerid, 0xFF66FFAA);
SendClientMessage(playerid, 0xFF66FFAA, "Your color has been set to Pink!");
}
if(listitem == 5)
{
SetPlayerColor(playerid, 0xC2A2DAAA);
SendClientMessage(playerid, 0xC2A2DAAA, "Your color has been set to Purple!");
}
if(listitem == 6)
{
SetPlayerColor(playerid, 0x33AA33AA);
SendClientMessage(playerid, 0x33AA33AA, "Your color has been set to Green!");
}
if(listitem == 7)
{
SetPlayerColor(playerid, 0xFFFF00AA);
SendClientMessage(playerid, 0xFFFF00AA, "Your color has been set to Yellow!");
}
if(listitem == 8)
{
SetPlayerColor(playerid, 0xFFFFFFAA);
SendClientMessage(playerid, 0xFFFFFFAA, "Your color has been set to White!");
}
}
}
return 1;
}