26.02.2013, 00:54
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;
}
}