Exports
Client
hasKey(plate, forceOwner)
Checks if a player has a vehicle key.
Parameters:
plate - string
- The vehicle plate
forceOwner - boolean
- Has to be the vehicle owner?
Returns:
true/false
- True or false
Example:
local state = exports.zrx_carlock:hasKey(vehicle, false)
if state then
print('yes')
else
print('no')
end
giveKey(plate)
Gives the vehicle key.
Parameters:
plate - string
- The vehicle plate
Example:
exports.zrx_carlock:giveKey('ABC123')
removeKey(plate)
Removes the vehicle key.
Parameters:
plate - string
- The vehicle plate
Example:
exports.zrx_carlock:removeKey('ABC123')
openKeyMenu()
Opens the givekey menu.
Example:
exports.zrx_carlock:openKeyMenu()
Server
hasKey(player, plate, forceOwner)
Checks if a player has a vehicle key.
Parameters:
player - number
- The player server id
plate - string
- The vehicle plate
forceOwner - boolean
- Has to be the vehicle owner?
Returns:
true/false
- True or false
Example:
local state = exports.zrx_carlock:hasKey(1, vehicle, false)
if state then
print('yes')
else
print('no')
end
giveKey(player, plate)
Gives the vehicle key.
Parameters:
player - number
- The player server id
plate - string
- The vehicle plate
Example:
exports.zrx_carlock:giveKey(1, 'ABC123')
removeKey(player, plate)
Removes the vehicle key.
Parameters:
player - number
- The player server id
plate - string
- The vehicle plate
Example:
exports.zrx_carlock:removeKey(1, 'ABC123')
updatePlate(oldPlate, newPlate)
Removes the vehicle key.
Parameters:
oldPlate - string
- The vehicle old plate
newPlate - string
- The vehicle new plate
Example:
local oldPlate = 'ABC123'
local newPlate = '123ABC'
exports.zrx_carlock:updatePlate(oldPlate, newPlate)
Last updated
Was this helpful?