01.08.2011, 15:42
pawn Код:
command(yourcmd, playerid, params[])
{
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Title", "Location 1\nLocation 2\nLocation 3", "Button 1", "");
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == dialogid)
{
if(listitem == 0)
{
SetTimer("Location1", 10000, false);
}
if(listitem == 1)
{
SetTimer("Location2", 10000, false);
}
if(listitem == 2)
{
SetTimer("Location3", 10000, false);
}
}
return 0;
}
pawn Код:
stock Location1(playerid)
{
SetPlayerPos(playerid, X, Y, Z);
SetPlayerVirtualWorld(playerid, virtualworldid);
}
stock Location2(playerid)
{
SetPlayerPos(playerid, X, Y, Z);
SetPlayerVirtualWorld(playerid, virtualworldid);
}
stock Location3(playerid)
{
SetPlayerPos(playerid, X, Y, Z);
SetPlayerVirtualWorld(playerid, virtualworldid);
}