19.03.2014, 14:16
Hello 
I'm newbie here, i have a question.
So if a player is in range of an airport they can't select a list of dialog,
I have tried using IsPlayerInRangeofPoint function
but it doesnt work 
how would i do that ? thanks

I'm newbie here, i have a question.
So if a player is in range of an airport they can't select a list of dialog,
Код:
ShowPlayerDialog(playerid, DIALOG_SLCDEST, DIALOG_STYLE_LIST, "Select Destination", "San Fierro\nLos Santos\nLas Venturas\nAbandoned Airfield\nMowrick Airport", "Select", "Cancel");
Код:
if(dialogid == DIALOG_SLCDEST)
{
if(response)
{
if(listitem == 0)
{
SetPlayerCheckpoint(playerid, -1301.9893,-347.4291,14.1484,10);
toSF[playerid] = 1;
SendClientMessage(playerid, green, "You've selected San Fierro as destination");
}
if(listitem == 1)
{
SendClientMessage(playerid, green, "Los Santos");
}
if(listitem == 2)
{
SendClientMessage(playerid, green, "Las Venturas");
}
if(listitem == 3)
{
SendClientMessage(playerid, green, "Abandoned Airfield");
}
if(listitem == 4)
{
SendClientMessage(playerid, green, "Mowrick Airport");
}
}
}
Код:
if(listitem == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
{
SetPlayerCheckpoint(playerid, -1301.9893,-347.4291,14.1484,10);
toSF[playerid] = 1;
SendClientMessage(playerid, green, "San Fierro");
}
return SendClientMessage(playerid, green, "You are near from this airport. Please select other airport");
}

how would i do that ? thanks


