Need Help
#2

Create a dialog for each floor, in OnPlayerDialogResponse track what they selected and then teleport them to the floor they selected.

pawn Код:
ShowPlayerDialog(playerid, 832, DIALOG_STYLE_LIST, "Which floor?", "1\n2\n3\n4\n5", "Go", "Cancel");
and in OnPlayerDialogResponse:

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.
  }
 }
}
Reply


Messages In This Thread
Need Help - by Farid - 19.12.2010, 13:55
Re: Need Help - by __ - 19.12.2010, 14:32
Re: Need Help - by Farid - 19.12.2010, 14:40
Re: Need Help - by blackwave - 19.12.2010, 14:42
Re: Need Help - by Farid - 19.12.2010, 14:44

Forum Jump:


Users browsing this thread: 2 Guest(s)