Trunk Lock System
Exports
Server

Server Exports

HasTrunkLock(plate) -> boolean — returns whether a lock exists for the normalized plate.

local hasLock = exports['trunk_lock']:HasTrunkLock('ABC123')

AddTrunkLock(plate) -> boolean — sets has_lock = 1 for the normalized plate.

exports['trunk_lock']:AddTrunkLock('ABC123')

RemoveTrunkLock(plate) -> boolean — sets has_lock = 0 for the normalized plate.

exports['trunk_lock']:RemoveTrunkLock('ABC123')

IsVehicleOwner(source, plate) -> boolean — returns true if the player owns the vehicle.

if exports['trunk_lock']:IsVehicleOwner(source, plate) then
    -- allow install
end

canAccessTrunk(source, vehicle) -> boolean — server-side access check used by the ox_inventory hook. Available only when Config.UseOxInventory = true.

local canAccess = exports['trunk_lock']:canAccessTrunk(source, vehicle)