Native referenceFiveM

CAN_ANCHOR_BOAT_HERE

0x26C10ECBDA5D043B VEHICLE
FUNCTION SIGNATURE
BOOL CAN_ANCHOR_BOAT_HERE(Vehicle boat);
Property Value
Native Name CAN_ANCHOR_BOAT_HERE
Hash 0x26C10ECBDA5D043B
Return Type BOOL
Parameters boat (Vehicle)

Description: Checks if a boat can be anchored at its present position without possibly intersecting collision later.

NativeDB Introduced: v323

Parameters

  • boat (Vehicle) — The boat to check.

Examples

local boat = GetVehiclePedIsIn(PlayerPedId(), false)
if not boat or not IsThisModelABoat(GetEntityModel(boat)) then return end

if CanAnchorBoatHere(boat) then
    print("It's safe to anchor the boat here")
else
    print("It's not safe to anchor the boat at this location")
end
const boat = GetVehiclePedIsIn(PlayerPedId(), false);
if (!boat || !IsThisModelABoat(GetEntityModel(boat))) return;

if (CanAnchorBoatHere(boat)) {
    console.log("It's safe to anchor the boat here");
} else {
    console.log("It's not safe to anchor the boat at this location");
}
using static CitizenFX.Core.Native.API;

int boat = GetVehiclePedIsIn(PlayerPedId(), false);
if (boat == 0 || !IsThisModelABoat(GetEntityModel(boat))) return;

if (CanAnchorBoatHere(boat))
{
    Debug.WriteLine("It's safe to anchor the boat here");
}
else
{
    Debug.WriteLine("It's not safe to anchor the boat at this location");
}
Back to VEHICLE