SA-MP Forums Archive
teleport menu - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: teleport menu (/showthread.php?tid=304830)



teleport menu - ThamburaaN - 20.12.2011

someone create a simple dcmd teleport menu for me . just add 2 locations i will add the rest. i just have a starting trouble.


Re: teleport menu - -Rebel Son- - 20.12.2011

pawn Код:
#define DIALOG_TELEPORTS   1545

ShowPlayerDialog(playerid, DIALOG_TELEPORTS, DIALOG_STYLE_LIST, "Teles", "Teleport1\nteleport2", "Tele", "Close");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_TELEPORTS){
        if(response){
            switch(listitem){
                case 0:
                {
                    //Selected Item: "Teleport1"
                }
                case 1:
                {
                    //Selected Item: "teleport2"
                }
            }
        }
        else{
            //The player has pressed "Tele".
            switch(listitem){
                case 0:
                {
                    //Selected Item: "Teleport1"
                }
                case 1:
                {
                    //Selected Item: "teleport2"
                }
            }
        }
    }
    return 0;
}



Re: teleport menu - JamesC - 20.12.2011

Quote:
Originally Posted by -Rebel Son-
Посмотреть сообщение
pawn Код:
shiz
Your dialog will teleport the player even if they click close. Take out the else statement in if(response).