dialog response
#6

First of all, you should use a command processor, like ZCMD:


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


Then you can do it like this.

PHP код:
#define DIALOG_ID_VIP_COLORS 1
CMD:ccolor(playeridparams[])
{
    
ShowPlayerDialog(playeridDIALOG_ID_VIP_COLORSDIALOG_STYLE_LIST"{FFFFFF}Chat Colors""{F30DFF}Pink\n{B10AFF}Purple\n{7B7DED}Navy Blue\n{00FFAA}Turqoise\n{FF7A21}Vibrant Orange\n{757575}Dark Grey\n{FF8585}Light Red\n{F6FF00}Bright Yellow\n{A34D4D}Brown""Choose""Cancel");
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_ID_VIP_COLORS:
        {
            if(
response)
            {
                new 
_:color;
                switch(
listitem)
                {
                    
// Listitem ID starts from 0. There are 9 items.
                    
case 0color 0xF30DFF00;
                    case 
1color 0xB10AFF00;
                    case 
2color 0x7B7DED00;
                    case 
3color 0x00FFAA00;
                    case 
4color 0xFF7A2100;
                    case 
5color 0x75757500;
                    case 
6color 0xFF858500;
                    case 
7color 0xF6FF0000;
                    case 
8color 0xA34D4D00;
                }
                
SendClientMessage(playerid_:color"* This is your new color.");
                
SetPlayerColor(playerid_:color);
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
dialog response - by JXF - 19.06.2016, 17:07
Re: dialog response - by FuNkYTheGreat - 19.06.2016, 17:22
Re: dialog response - by JXF - 19.06.2016, 17:41
Re: dialog response - by Luicy. - 19.06.2016, 17:55
Re: dialog response - by FuNkYTheGreat - 19.06.2016, 17:59
Re: dialog response - by Jf - 19.06.2016, 18:09

Forum Jump:


Users browsing this thread: 1 Guest(s)