Defining Dialog Help
#6

Here you are the code my friend
PHP код:
#define DIALOG_MUSIC 53
#define DIALOG_MUSIC2 54
#define DIALOG_MUSIC3 55
#define DIALOG_RADIO 56
#define DIALOG_ADMIN 57
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_MUSIC)
    {
        if(
response)
        {
              switch(
listitem)
            {
                case 
0//English Songs
                
{
                    
ShowPlayerDialog(playeridDIALOG_MUSIC2DIALOG_STYLE_TABLIST_HEADERS"English Songs""Song \tArtist \tDuration \nCongratulations \tPost Malone \t4:16 \nDespacito \tJustin Bieber \t2:43 \nAll I Do \tLogic \t3:52""Play""Back");
                }
                case 
1//Hindi Songs
                
{
                    
ShowPlayerDialog(playeridDIALOG_MUSIC3DIALOG_STYLE_TABLIST_HEADERS"Hindi Songs""Song \tArtist \tDuration \nSoch \tChen-K \t3:18 \nNaamchor \tChen-K \t1:51""Play""Back");
                }
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"You've closed the Music Dialog");
        }
        return 
1;
    }
    if(
dialogid == DIALOG_MUSIC2//English Songs
    
{
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:
                {
                    
PlayAudioStreamForPlayer(playerid"http://k003.kiwi6.com/hotlink/q16rvkee67/Post_Malone_-_Congratulations_Meroshi_Trap_Remix_.mp3");
                    
SendClientMessage(playeridCOLOR_WHITE"Type {FF6600}/stop{FFFFFF} to stop the music");
                }
                case 
1:
                {
                    
PlayAudioStreamForPlayer(playerid"http://k003.kiwi6.com/hotlink/ysgwj5jw8m/Justin_Bieber_-_Despacito_Jeydee_Club_Mix_ft._Luis_Fonsi_Daddy_Yankee.mp3");
                    
SendClientMessage(playeridCOLOR_WHITE"Type {FF6600}/stop{FFFFFF} to stop the music");
                }
                case 
2:
                {
                    
PlayAudioStreamForPlayer(playerid"http://k003.kiwi6.com/hotlink/mnwozac2sp/Logic-_All_I_Do.mp3");
                    
SendClientMessage(playeridCOLOR_WHITE"Type {FF6600}/stop{FFFFFF} to stop the music");
                }
            }
        }
        else
        {
            
ShowPlayerDialog(playeridDIALOG_MUSICDIALOG_STYLE_LIST"Music""English Songs \nHindi Songs""Play""Cancel");
        }
        return 
1;
    }
    if(
dialogid == DIALOG_MUSIC3//Hindi Songs
    
{
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:
                {
                    
PlayAudioStreamForPlayer(playerid"http://k003.kiwi6.com/hotlink/hgkh82sfg1/CHEN-K_-_SOCH_Lyrics_Video_EXPLICIT_URDU_RAP.mp3");
                    
SendClientMessage(playeridCOLOR_WHITE"Type {FF6600}/stop{FFFFFF} to stop the music");
                }
                case 
1:
                {
                    
PlayAudioStreamForPlayer(playerid"http://k003.kiwi6.com/hotlink/i3rl0qgd9b/CHEN-K_-_NAAMCHOR_Official_Video_x_LYRIK_URDU_RAP.mp3");
                    
SendClientMessage(playeridCOLOR_WHITE"Type {FF6600}/stop{FFFFFF} to stop the music");
                }
            }
        }
        else
        {
            
ShowPlayerDialog(playeridDIALOG_MUSICDIALOG_STYLE_LIST"Music""English Songs \nHindi Songs""Play""Cancel");
        }
        return 
1;
    }
    if(
dialogid == DIALOG_RADIO)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:
                {
                    
PlayAudioStreamForPlayer(playerid"http://7609.live.streamtheworld.com:80/977_HITS_SC");
                    
SendClientMessage(playeridCOLOR_WHITE"type {FF6600}/stop{FFFFFF} to stop the radio");
                }
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"You've closed the Radio Dialog");
        }
        return 
1;
    }
    if(
dialogid == DIALOG_ADMIN//Admin Control Panel
    
{
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:
                {
                    
ShowPlayerDialog(playeridDIALOG_ADMIN+1DIALOG_STYLE_LIST"Weapons""Minigun \nChainsaw \nMoltov \nJetpack""Select""Back");
                }
                case 
1:
                {
                    
ShowPlayerDialog(playeridDIALOG_ADMIN+2DIALOG_STYLE_LIST"Perks""Health \nArmour""Select""Back");
                }
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"You've closed the Admin Control Panel");
        }
        return 
1;
    }
    if(
dialogid == DIALOG_ADMIN+1//Weapons
    
{
        if(
response)
        {
            switch(
listitem)
            {
                case 
0// Minigun
                
{
                    
GivePlayerWeapon(playerid3899999);
                    
SendClientMessage(playeridCOLOR_WHITE"* {66ffcc}Minigun has given to you!");
                    
PlayerPlaySound(playerid10580.00.00.0);
                }
                case 
1//Chainsaw
                
{
                    
GivePlayerWeapon(playerid999999);
                    
SendClientMessage(playeridCOLOR_WHITE"* {66ffcc}Chainsaw has given to you!");
                    
PlayerPlaySound(playerid10580.00.00.0);
                }
                case 
2//Moltov
                
{
                    
GivePlayerWeapon(playerid1899999);
                    
SendClientMessage(playeridCOLOR_WHITE"* {66ffcc}Moltov has given to you!");
                    
PlayerPlaySound(playerid10580.00.00.0);
                }
                case 
3//jetpack
                
{
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_USEJETPACK);
                    
SendClientMessage(playeridCOLOR_WHITE"* {66ffcc}Jetpack has given to you!");
                    
PlayerPlaySound(playerid10580.00.00.0);
                }
            }
        }
        else
        {
            
ShowPlayerDialog(playeridDIALOG_ADMINDIALOG_STYLE_LIST"Admin Control Panel""Weapons \nPerks""Select""Cancel");
        }
        return 
1;
    }
    if(
dialogid == DIALOG_ADMIN+2//Perks
    
{
        if(
response)
        {
            switch(
listitem)
            {
                case 
0//Health
                
{
                    
SetPlayerHealth(playerid100.0);
                    
SendClientMessage(playeridCOLOR_WHITE"* {66ffcc}Your Health has been refilled");
                    
PlayerPlaySound(playerid10580.00.00.0);
                }
                case 
1//Armour
                
{
                    
SetPlayerArmour(playerid100.0);
                    
SendClientMessage(playeridCOLOR_WHITE"* {66ffcc}Your Armour has been refilled");
                    
PlayerPlaySound(playerid10580.00.00.0);
                }
            }
        }
        else
        {
            
ShowPlayerDialog(playeridDIALOG_ADMINDIALOG_STYLE_LIST"Admin Control Panel""Weapons \nPerks""Select""Cancel");
        }
        return 
1;
    }
    return 
0;

Reply


Messages In This Thread
Defining Dialog Help - by DeStRoY232 - 24.09.2017, 08:49
Re: Defining Dialog Help - by Kraeror - 24.09.2017, 09:00
Re: Defining Dialog Help - by DeStRoY232 - 24.09.2017, 09:01
Re: Defining Dialog Help - by Zeth - 24.09.2017, 09:15
Re: Defining Dialog Help - by DeStRoY232 - 24.09.2017, 09:20
Re: Defining Dialog Help - by Kraeror - 24.09.2017, 09:45
Re: Defining Dialog Help - by Zeth - 24.09.2017, 09:56
Re: Defining Dialog Help - by DeStRoY232 - 24.09.2017, 10:09
Re: Defining Dialog Help - by Kane - 24.09.2017, 10:11
Re: Defining Dialog Help - by R4nd4ll - 24.09.2017, 10:34

Forum Jump:


Users browsing this thread: 1 Guest(s)