10.08.2011, 21:12
You can use that
simply
pawn Код:
native Float:GetVehicleDistanceFromPoint(vehicleid, Float:X, Float:Y, Float:Z);
Quote:
Should be as simple as this shouldn't it?
Код:
stock IsPlayerNearVehicle(playerid, vehicleid, Float:range) { new Float:x, Float:y, Float:z; GetVehiclePos(vehicleid, x, y, z); if(IsPlayerInRangeOfPoint(playerid, range, x, y, z)) { return 1; } return 0; } |
pawn Код:
stock IsPlayerNearVehicle(playerid, vehicleid, Float:range)
{
if(!GetVehicleModel(vehicleid)) return 0;
new Float:x, Float:y, Float:z;
GetVehiclePos(vehicleid, x, y, z);
return IsPlayerInRangeOfPoint(playerid, range, x, y, z);
}