Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 490 Bytes

CanAnchor.md

File metadata and controls

30 lines (18 loc) · 490 Bytes

CanAnchor

Description

Returns if current boat can be anchored, vehicle need to passed.

Parameters

  • vehicle: current vehicle

Examples

    local ped = PlayerPedId()
    local vehicle = GetVehiclePedIsIn(ped, true)
    local isDriver = GetPedInVehicleSeat(vehicle, -1) == ped


    local canAnchor = exports.fd_anchor:CanAnchor(vehicle)

    if canAnchor and isDriver then
        -- can anchor
        return
    end

    -- cannot anchor
    return false