06.07.2011, 13:23
You just need to change the coordinates ( X, Y, Z ):
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/map", true) == 0)
{
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_LIST, "Where do you want to go ?", "Beach\nMall\nAirport\nCity Hall", "Choose", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 123)
{
if(response)
{
if(listitem == 0)
{
SetPlayerCheckpoint(playerid, X, Y, Z, 8.0);
SendClientMessage(playerid, 0xFFFF00FF, "GPS: Beach.");
}
else if(listitem == 1)
{
SetPlayerCheckpoint(playerid, X, Y, Z, 8.0);
SendClientMessage(playerid, 0xFFFF00FF, "GPS: Mall.");
}
else if(listitem == 2)
{
SetPlayerCheckpoint(playerid, X, Y, Z, 8.0);
SendClientMessage(playerid, 0xFFFF00FF, "GPS: Airport.");
}
else if(listitem == 3)
{
SetPlayerCheckpoint(playerid, X, Y, Z, 8.0);
SendClientMessage(playerid, 0xFFFF00FF, "GPS: City Hall.");
}
}
}
return 1;
}