[Tutorial] How to make a teleport menu in dialog
#3

Well I think this would be little better for a "All" world server.
pawn Код:
#include <zcmd>
#include <a_samp>
#define TPMENU 1
#define TPLS 2
#define TPLV 3
#define TPSF 4
CMD:teleport(playerid, params[]) // When we type /teleport
{
    ShowPlayerDialog(playerid, TPMENU, DIALOG_STYLE_LIST, "Teleport Menu", "Los Santos\nLas Venturas\nSan Fierro", "Go", "Exit");
    return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == TPMENU)
    {
        if(response) // Clicked 'Go'
        {
            switch(listitem)
            {
                case 0: ShowPlayerDialog(playerid, TPLS, DIALOG_STYLE_LIST, "Teleport Menu", "Police Department\nGym\nGrove Street\nGlen Park", "Go", "Exit");
                case 1: ShowPlayerDialog(playerid, TPLV, DIALOG_STYLE_LIST, "Teleport Menu", "Police Department\nGym\nGrove Street\nGlen Park", "Go", "Exit");
                case 2: ShowPlayerDialog(playerid, TPSF, DIALOG_STYLE_LIST, "Teleport Menu", "Police Department\nGym\nGrove Street\nGlen Park", "Go", "Exit");
            }
        }
    }
    return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == TPLS)
    {
        if(response) // Clicked 'Go'
        {
            switch(listitem)
            {
                case 0: SetPlayerPos Shit here
                case 1: SetPlayerPos Shit here
                case 2: SetPlayerPos Shit here
                case 3: SetPlayerPos Shit here
            }
        }
    }
    return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == TPLV)
    {
        if(response) // Clicked 'Go'
        {
            switch(listitem)
            {
                case 0: SetPlayerPos Shit here
                case 1: SetPlayerPos Shit here
                case 2: SetPlayerPos Shit here
                case 3: SetPlayerPos Shit here
            }
        }
    }
    return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == TPSF)
    {
        if(response) // Clicked 'Go'
        {
            switch(listitem)
            {
                case 0: SetPlayerPos Shit here
                case 1: SetPlayerPos Shit here
                case 2: SetPlayerPos Shit here
                case 3: SetPlayerPos Shit here
            }
        }
    }
    return 0;
}
This aint working becuse i havent set SetPlayerPos I just made this fast for a example
Anyway Good Job. Keep it up.
Reply


Messages In This Thread
How to make a teleport menu in dialog - by jackx3rx - 26.12.2014, 16:10
Re: How to make a teleport menu in dialog - by Tookieson - 26.12.2014, 16:22
Re: How to make a teleport menu in dialog - by Luicy. - 26.12.2014, 19:19
Re: How to make a teleport menu in dialog - by jackx3rx - 26.12.2014, 20:46
Re: How to make a teleport menu in dialog - by Luicy. - 26.12.2014, 20:52
Re: How to make a teleport menu in dialog - by www - 30.12.2014, 22:55
Re: How to make a teleport menu in dialog - by Diti1 - 30.12.2014, 23:29

Forum Jump:


Users browsing this thread: 2 Guest(s)