[Ajuda] Cor vip
#4

PHP Code:
#include "a_samp"
enum colorData {
    
colorName[24],
    
color
};
new
    
Colors[][colorData] = {
        {
"White"0xFFFFFFFF},
        {
"Middle Purple"0xD782BAFF},
        {
"Plum"0xE18AD4FF},
        {
"Pink Pearl"0xEEB1D5FF},
        {
"Classic Rose"0xEFC7E5FF},
        {
"Platinum"0xE0EFDAFF}
};
new
    
PlayerColor[MAX_PLAYERS];
main() {}
public 
OnPlayerText(playeridtext[]) {
    new
        
message[144],
        
name[MAX_PLAYER_NAME];
    
format(messagesizeof(message), "{%06x}%s{ffffff}[%i]: %s", (Colors[PlayerColor[playerid]][color] >>> 8), (GetPlayerName(playeridnameMAX_PLAYER_NAME), name), playeridtext);
    
SendClientMessageToAll(-1message);
    return 
0;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (!
strcmp(cmdtext"/minhacor"true))
    {
        new
            
string[sizeof(Colors) * 35];
        for (new 
i!= sizeof(Colors); ++)
            
format(stringsizeof(string), "%s\n{%06x}%s %s"string, (Colors[i][color] >>> 8), Colors[i][colorName], ((!i) ? ("(Padrгo)") : (" ")));
        
ShowPlayerDialog(playerid2478DIALOG_STYLE_LIST"Escolha uma cor"string"Escolher""Fechar");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[]) {
    if (!
response)
        return 
1;
    if (
dialogid == 2478) {
        
PlayerColor[playerid] = listitem;
    }
    return 
1;

Reply


Messages In This Thread
Cor vip - by Ryuzaki07 - 04.04.2019, 01:59
Re: Cor vip - by Psicotico - 04.04.2019, 02:18
Re: Cor vip - by NWDMadara - 04.04.2019, 02:20
Re: Cor vip - by 1sbedx - 04.04.2019, 03:00
Re: Cor vip - by Ryuzaki07 - 04.04.2019, 17:45
Re: Cor vip - by Ryuzaki07 - 04.04.2019, 17:58

Forum Jump:


Users browsing this thread: 1 Guest(s)