How to create multiple dialogs
#1

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    if(dialogid == DIALOG_CLASS) {
        if(!response) // if player presses ESC re-show the dialog
            return ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Choose your class", "Class 1\nClass 2\nClass 3", "Choose", "");
        switch(listitem) {
            case 0: 
			 		{
     				ShowPlayerDialog(playerid, DIALOG_ASSAULT, DIALOG_STYLE_MSGBOX, "Class information", "information of the class....", "Choose", "Back");
            		}
            case 1: {
     					//dialogg
            		}
            case 2: { // CLASS 3
                		// stuff for class 3
            		}
            			if(dialogid == DIALOG_ASSAULT) {
            			return ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Class information", "information of the class....", "Choose", "Back");
        				switch(listitem) {
            			case 0:
			 					{
     								GivePlayerWeapon(32,80)
            					}
    					case 1: {


            					}
            			case 2: { 
            			
            					}
        }
    }
    return 0;
}
Take a look at this script, but I cant get this in work.. I want if a player choose class1, the player redirected to another dialog with class info such as weapons, abilities. Any suggestions? (rep+)
Reply


Messages In This Thread
How to create multiple dialogs - by MSI - 20.01.2012, 21:17
Re: How to create multiple dialogs - by BleverCastard - 20.01.2012, 21:29
Re: How to create multiple dialogs - by Shadow_ - 20.01.2012, 21:43
Re: How to create multiple dialogs - by MSI - 21.01.2012, 17:57

Forum Jump:


Users browsing this thread: 1 Guest(s)