๐ฎClient Side
Exports List
exports['ug-garage']:HasVehicleKeys(vehicle: entity, target: playerId)
exports['ug-garage']:OpenPoliceImpound()Has Vehicle Keys
This export is used to verify if a player has the vehicle keys of the specified vehicle. With this, you can specify the target or let it without anything.
Usage:
exports['ug-garage']:HasVehicleKeys(vehicle: entity, target: playerId)Example #1:
This example is used to verify if the current player has the keys for a vehicle.
RegisterCommand('hasvehiclekeys', function (source, args)
local isPlayerInVehicle = IsPedInAnyVehicle(PlayerPedId(), false)
if isPlayerInVehicle then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if DoesEntityExist(vehicle) then
local hasVehicleKeys = exports['ug-garage']:HasVehicleKeys(vehicle)
print(hasVehicleKeys)
end
end
end, false)Example #2 (ESX):
This example is used to verify if the closest player has the keys for a vehicle using the ESX 1.1 framework.
Example #2 (ESX Legacy):
This example is used to verify if the closest player has the keys for a vehicle using the ESX Legacy framework.
Example #2 (QB-Core):
This example is used to verify if the closest player has the keys for a vehicle using the QB-Core framework.
Returns:
hasVehicleKeys: boolean
Open Police Impound Menu
This export is used to open the police impound menu. It will trigger the function that checks if the player has the required job authorization to use this menu.
Usage:
Example:
Returns:
None
Last updated
Was this helpful?