[HELP]Create a country menu
#4

Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {

  if (dialogid == 1) {
    if (!response) {SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!"); return false;}
    new message[196];
    format(message, sizeof(message), "You are teleported to: %s", inputtext);
    SendClientMessage(playerid, 0xFFFFFFFF, message);

    if (listitem == 1) {SetPlayerPos(playerid, x, y, z);} //san fiero
    else if (listitem == 2) {SetPlayerPos(playerid, x, y, z);} //los santos

    return true;
  }

  return false;
}
You need to decide where to teleport the player due to listitem value. I'm not sure if first item in list starts with 0 or 1, in the example I presumed it starts with 1.
Reply


Messages In This Thread
[HELP]Create a country menu - by breakpaper - 14.11.2009, 14:18
Re: [HELP]Create a country menu - by niCe - 14.11.2009, 14:50
Re: [HELP]Create a country menu - by breakpaper - 14.11.2009, 15:16
Re: [HELP]Create a country menu - by niCe - 14.11.2009, 15:34

Forum Jump:


Users browsing this thread: 1 Guest(s)