Multiple inputs in dialog
#1

I have it to where when an admin is setting the skin of someone, it will show up a dialog asking for the player's ID whose skin to change and you enter that, but it stops there. I want after they enter the ID, it will show another dialog asking for the skin ID of which to set the player to, but I don't know how to save multiple input texts. Can someone teach me how to save the admin's input text for the player ID and then the skin?

pawn Код:
CMD:admin(playerid, params[]){
    if(Bit16_Get(g_Admin,playerid) > 0) {
        ShowPlayerDialog(playerid,10,2,"Admin panel","Set skin","Select", "Cancel");
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
    if(dialogid == 16) {
        if(!response) return 0;
        if(!IsPlayerConnected(strval(inputtext))) return ShowPlayerDialog(playerid,16,2,"Admin panel","What's the ID of the player whose skin you wish to set?\n{FF6347}Invalid player ID!","Submit","Cancel");
        new str[128],id = (strval(inputtext));
        format(str,sizeof(str),"%s %s set your skin ID to..",GetAdmin(playerid),GetName(playerid));
        SendClientMessage(id,COLOR_GRAY,str);
        return 1;
    }
    if(dialogid == 10) {
        if(!response) return 0;
        switch(listitem){
            case 0:{
                ShowPlayerDialog(playerid,16,2,"Admin panel","What's the ID of the player whose skin you wish to set?","Submit","Cancel");
            }
        }
        return 1;
    }
}
Reply
#2

Search this form under 'includes' for easydialog, that may help you
Reply
#3

I have the dialog created, I don't need something to create a dialog for me. I just want to know how I can get the inputtext from one dialog and then save it and proceed to another and save that too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)