31.01.2015, 15:57
I have taken back the original code but how to do so I don't have to click the "Continue" button before I get the interiors dialog? Codes..
pawn Код:
CMD:interiors(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new text[] = "In the next list, select where to go.";
return ShowPlayerDialog(playerid, HOUSES0, DIALOG_STYLE_MSGBOX, "Interior Houses", text, "Continue", "Cancel");
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use this command.");
}
return 1;
}
pawn Код:
switch(dialogid){
case HOUSES0:{
if(response){
selection[playerid] = listitem;
new text[1024];
for(new x;x<sizeof(Houses);x++){
format(text, sizeof(text), "%s%s || (%d)\n", text, Houses[x][interiorname], Houses[x][interior]);
}
ShowPlayerDialog(playerid, HOUSES, DIALOG_STYLE_LIST, "Interior Name || Interior ID", text, "Go!", "Exit");
}
}
case HOUSES:{
if(response){
new text[25];
SetPlayerPos(playerid, Houses[listitem][PosX], Houses[listitem][PosY], Houses[listitem][PosZ]);
SetPlayerInterior(playerid, Houses[listitem][interior]);
SetPlayerVirtualWorld(playerid, 0);
format(text, sizeof(text), "%s", Houses[listitem][interiorname]);
SendClientMessage(playerid, COLOR_WHITE, text);
}
}
}