31.01.2014, 18:35
(
Последний раз редактировалось Stefand; 01.02.2014 в 19:13.
)
-FIXED-
stock GetVehicleZone(vehicleid)
{
new
Float: X,
Float: Y,
Float: Z;
for (new i; i < sizeof (gSAZones); ++i)
{
GetVehiclePos(vehicleid, X, Y, Z);
if (gSAZones[i][SAZONE_AREA][0] < X < gSAZones[i][SAZONE_AREA][3] && gSAZones[i][SAZONE_AREA][1] < Y < gSAZones[i][SAZONE_AREA][4] && gSAZones[i][SAZONE_AREA][2] < Z < gSAZones[i][SAZONE_AREA][5]) return i;
}
return -1;
}
new
zoneid = GetVehicleZone(vehicleid);
if (zoneid != -1)
{
// vehicleid is inside a valid zone..
}
{"Whetstone" {-2997.40,-2892.90,-242.90,-1213.90,-1115.50,900.00}}
};
native IsValidVehicle(vehicleid);
if (!IsValidVehicle(vehicleid)) return -1;