Multiple inputs in dialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Multiple inputs in dialog (
/showthread.php?tid=418788)
Multiple inputs in dialog -
Noles2197 - 26.02.2013
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;
}
}
Re: Multiple inputs in dialog -
Dotayuri - 26.02.2013
Search this form under 'includes' for easydialog, that may help you
Re: Multiple inputs in dialog -
Noles2197 - 26.02.2013
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.