New Dialog
#1

Hi, im begginer scripter and i don't know how to add 2nd dialog! Can somebody help me? I did 1st dialog like this:
Cmd
Код:
}
    if (strcmp("/gangs", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Gangs", "Grove \nBallas \nLos Aztecas \nVagos", "OK","Cancel");
	    return 1;
    }
And this:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(response)// They pressed the first button.
    {
    switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
        {
		case 1:// Our dialog!
    	    {
           	switch(listitem)// Checking which listitem was selected
        	{
        	    case 0:// Grove
        	    {
        	        SetPlayerSkin(playerid,107);
        	        GivePlayerWeapon(playerid,30,9999);
        	        GivePlayerWeapon(playerid,24,9999);
        	        GivePlayerWeapon(playerid,18,9999);
        	        SetPlayerPos(playerid,2477.7805,-1686.5349,13.5078);
        	    }
        	    case 1: // BAllas
        	    {
        	        SetPlayerSkin(playerid,104);
                    GivePlayerWeapon(playerid,30,9999);
        	        GivePlayerWeapon(playerid,24,9999);
        	        GivePlayerWeapon(playerid,18,9999);
        	        SetPlayerPos(playerid,2649.9617,-2031.5221,13.5540);
        	    }
        	    case 2: // Zilie
        	    {
    	           SetPlayerSkin(playerid,115);
        	       GivePlayerWeapon(playerid,30,9999);
       	           GivePlayerWeapon(playerid,24,9999);
       	           GivePlayerWeapon(playerid,18,9999);
       	           SetPlayerPos(playerid,2143.2739,-1803.2969,16.1475);
        	    }
        	    case 3://Vagos
			    {
				   SetPlayerPos(playerid,2770.5347,-1627.9919,12.1775);
				   SetPlayerSkin(playerid,108);
				   GivePlayerWeapon(playerid,30,9999);
       	           GivePlayerWeapon(playerid,24,9999);
       	           GivePlayerWeapon(playerid,18,9999);
			    }
        	}
		 }
		 }
    }
	return 1;
But now i wana do similar with mafias! cmd i did is right
Код:
if (strcmp("/mafia", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Mafias", "Triads \nRussian Mafia \nItalian Mafia", "OK","Cancel");
	    return 1;
    }
But what to do now in OnDialogResponse?
Reply


Messages In This Thread
New Dialog - by DJRebis - 25.06.2013, 11:45
Re: New Dialog - by Josh_Main - 25.06.2013, 12:01
Re: New Dialog - by DJRebis - 25.06.2013, 12:36
Re: New Dialog - by dEcooR - 25.06.2013, 12:42
Re: New Dialog - by DJRebis - 25.06.2013, 12:54

Forum Jump:


Users browsing this thread: 1 Guest(s)