04.07.2013, 02:49
I caught the runway coordinates with the Gangzone Maker and I'm trying to detect if the plane is between these points, so I need the function IsPlayerInArea, the one which really works.
Does anyone have the function?
And my example is the following:
Does anyone have the function?
And my example is the following:
pawn Код:
public OnPlayerUpdate(playerid)
{
new modelid;
if(IsPlayerInAnyVehicle(playerid))
{
modelid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(modelid == 476 || modelid == 511 || modelid == 519 || modelid == 577 || modelid == 592 || modelid == 593) // Some plane models
{
if(IsPlayerInArea(playerid, 1373.046875,1259.765625, 1394.53125, 1707.03125)) // Runway area
{
Pista1 = false; // FALSE = its busy
}
else
{
Pista1 = true; // TRUE = its free
}
}
return 1;
}