19.12.2010, 14:32
Create a dialog for each floor, in OnPlayerDialogResponse track what they selected and then teleport them to the floor they selected.
and in OnPlayerDialogResponse:
pawn Код:
ShowPlayerDialog(playerid, 832, DIALOG_STYLE_LIST, "Which floor?", "1\n2\n3\n4\n5", "Go", "Cancel");
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
// Assuming you already have dialogs implemented, we'll add an if statement instead of a switch statement.
if(dialogid == 832) {
switch(listitem) { // switch here once we've checked which dialogid we're dealing with.
case 0: SetPlayerPos(playerid, 0, 0, 0); // Floor 1. Replace the coords from 0 0 0 to whatever they should be.
case 1: SetPlayerPos(playerid, 0, 0, 0); // Floor 2.
case 2: SetPlayerPos(playerid, 0, 0, 0); // Floor 3.
case 3: SetPlayerPos(playerid, 0, 0, 0); // Floor 4.
case 4: SetPlayerPos(playerid, 0, 0, 0); // Floor 5.
}
}
}