14.02.2014, 14:12
On the top of your gamemode put this:
Command:
Under
Put this:
If there no other dialogs then put this full OnDialogResponse:
pawn Код:
#define WARPS 40041
pawn Код:
CMD:warps(playerid, params[])
{
{
ShowPlayerDialog(playerid, WARPS, DIALOG_STYLE_LIST, "{008000}- {FFFFFF}Warps{008000} - {FFFFFF}", "Garage\nStation", "Warp", "Annuleer");
return 1;
}
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
pawn Код:
if(dialogid == WARPS) // Dialog
{
if(response)
{
if(listitem == 0)// (ID: 0)
{
SetPlayerPos(playerid, 1980.3363, 1765.5774, 11.6543);
}
if(listitem == 1) // (ID: 1)
{
SetPlayerPos(playerid, 2766.8821, 1774.3678, 10.8203); //Station
}
}
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == WARPS) // Dialog
{
if(response)
{
if(listitem == 0)// (ID: 0)
{
SetPlayerPos(playerid, 1980.3363, 1765.5774, 11.6543);
}
if(listitem == 1) // (ID: 1)
{
SetPlayerPos(playerid, 2766.8821, 1774.3678, 10.8203); //Station
}
}
}
return 1;
}