28.03.2011, 18:43
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");
}
____________________________________
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;
}
}
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!