PDA

View Full Version : teleport menu


ThamburaaN
20/12/2011, 02:17 AM
someone create a simple dcmd teleport menu for me . just add 2 locations i will add the rest. i just have a starting trouble.

-Rebel Son-
20/12/2011, 02:20 AM
#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;
}

JamesC
20/12/2011, 03:56 AM
shiz

Your dialog will teleport the player even if they click close. Take out the else statement in if(response).