Because
IsPlayerInRangeOfPoint takes a playerid as the first parameter, not the vehicle id.
If you want here is a working code for what you need, with a function called
'CheckPlayerDistanceToVehicle', so you can use that to check, or make your own by looking at it.
pawn Код:
stock CheckPlayerDistanceToVehicle( Float:radi, playerid, vehicleid )
{
// Function: CheckPlayerDistanceToVehicle( Float:radi, playerid, vehicleid )
new
Float:vX, Float:vY, Float:vZ;
GetVehiclePos( vehicleid, vX, vY, vZ );
return IsPlayerInRangeOfPoint( playerid, radi, vX, vY, vZ );
}
Example of usage would be:
pawn Код:
CheckPlayerDistanceToVehicle( 3.5, playerid, vehid ) )
That checks if a player is in a 3.5 radius of the vehicle with the vehid as the vehicle id.
Cheers !