ShowPlayerDialog Help Please!
#6

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/teleports1", cmdtext, true, 10) == 0)
{
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST,"Choose where you want to be teleported!", LS\nSF\nLV\nUFO"", "Teleport", "Cancel");
    }
That comes when you type /teleports1
____________________________________

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    {
    if(dialogid == 1)
        {
            if(!response)
            {
                ShowPlayerDialog(playerid, -1, DIALOG_STYLE_LIST, "-1", "-1", "-1", "-1");
            }
            else
            {
                switch(listitem)
                {
                    case 0:// IF CHOOSED LS!
                    {
                            SetPlayerPos(playerid, COORDINATES HERE!!!);
                                                //Add here under this if you want to add something else
                    }
                    case 1: //IF CHOOSED SF!
                    {
                        SetPlayerPos(playerid, COORDINATES HERE!!!);
                                                //other stuff
                    }
                    case 2: // LV
                    {
                        SetPlayerPos(playerid, COORDINATES HERE);
               
                    }
                    case 3: //if choosed UFO!!
                    {
                                        SetPlayerPos(playerid, COORDINATES HERE!!!!);                
                    }
            }
        }
    }
    return 1;
}
}
That should work, making it took 15 minutes off me <<

Anyway, where reads (ADD COORDINATES HERE!!!) means you have to add the coordinates to there.


And PLEASE!
Dont just copy that, try to learn from it! Its the only way to learn scripting!
Reply


Messages In This Thread
ShowPlayerDialog Help Please! - by nateykurgan - 28.03.2011, 15:40
Re: ShowPlayerDialog Help Please! - by XFlawless - 28.03.2011, 15:42
Re: ShowPlayerDialog Help Please! - by nateykurgan - 28.03.2011, 16:03
Re: ShowPlayerDialog Help Please! - by -Rebel Son- - 28.03.2011, 17:24
Re: ShowPlayerDialog Help Please! - by nateykurgan - 28.03.2011, 17:37
Re: ShowPlayerDialog Help Please! - by GNGification - 28.03.2011, 18:43
Re: ShowPlayerDialog Help Please! - by rbN. - 28.03.2011, 18:49
Re: ShowPlayerDialog Help Please! - by nateykurgan - 31.03.2011, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)