someone create a simple dcmd teleport menu for me . just add 2 locations i will add the rest. i just have a starting trouble.
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;
}
Your dialog will teleport the player even if they click close. Take out the else statement in if(response).