Server
Exports - Serverside
toggleLock
(Un)locks the closest vehicle
Parameters
playerId - number
- The ServerId of the player
toggleLockAdmin
(Un)locks the closest vehicle without a key needed
Parameters
playerId - number
- The ServerId of the player
GetVehicleLockState
Get whether the vehicle is locked or unlocked
Parameters
vehicle - int
- A vehicle handle
Retuns
isLocked - boolean
- whether the vehicle is locked or unlocked
GetVehicleLockStatus
Get the current Lock Status
Parameters
vehicle - int
- A vehicle handle
Retuns
lockStatus - number
- Lockstate (1 if unlocked / 2 if locked)
IsVehicleWhitelisted
Parameters
plate - string
- Vehicle Plate
model - int
- Vehicle Model
Retuns
isWhitelisted - boolean
- whether the vehicle is whitelisted or not
IsVehicleBlacklisted
Parameters
plate - string
- Vehicle Plate
model - int
- Vehicle Model
Retuns
isBlacklisted - boolean
- whether the vehicle is blacklisted or not
GetAllVehicleKeys
Gets all vehicle keys saved in vehiclekeys.json
Retuns
vehicleKeys - table
- All Vehicle Keys
RefreshPlayerKeys
It will add not existing permanent keys from owned vehicles to the player
Parameters
playerId - number
- The ServerId of the player
GetPlayerKeys
Gets the players vehicle keys
Parameters
playerData - table
- PlayerData of the player which you want to get the keys from
Retuns
keys - table
- Players Vehicle Keys
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
GetPlayerPrimaryKeys
Gets the players primary vehicle keys
Parameters
playerData - table
- PlayerData of the player which you want to get the primary keys from
Retuns
keys - table
- Players Vehicle Keys
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
GetPlayerSecondaryKeys
Gets the players secondary vehicle keys
Parameters
playerData - table
- PlayerData of the player which you want to get the secondary keys from
Retuns
keys - table
- Players Vehicle Keys
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
GetPlayerTempKeys
Gets the players temporary vehicle keys
Parameters
playerData - table
- PlayerData of the player which you want to get the temporary keys from
Retuns
keys - table
- Players Vehicle Keys
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
HasPlayerKey
Checks whether the player has a key for the given plate and model or not
Parameters
playerData - table
- PlayerData of the player which you want to check if he has a key
plate - string
- Vehicle Plate
model - number
- Vehicle Model
Retuns
hasKey - boolean
- whether the player has a key for the given vehicle or not
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
HasPlayerPrimaryKey
Checks whether the player has a primary key for the given plate and model or not
Parameters
playerData - table
- PlayerData of the player which you want to check if he has a primary key
plate - string
- Vehicle Plate
model - number
- Vehicle Model
Retuns
hasKey - boolean
- whether the player has a primary key for the given vehicle or not
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
HasPlayerSecondaryKey
Checks whether the player has a secondary key for the given plate and model or not
Parameters
playerData - table
- PlayerData of the player which you want to check if he has a secondary key
plate - string
- Vehicle Plate
model - number
- Vehicle Model
Retuns
hasKey - boolean
- whether the player has a secondary key for the given vehicle or not
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
HasPlayerTempKey
Checks whether the player has a temporary key for the given plate and model or not
Parameters
playerData - table
- PlayerData of the player which you want to check if he has a temporary key
plate - string
- Vehicle Plate
model - number
- Vehicle Model
Retuns
hasKey - boolean
- whether the player has a temporary key for the given vehicle or not
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
GetPlayerVehicles
Get the players vehicles saved in database: owned_vehicles
Parameters
playerData - table
- PlayerData of the player which you want to get the vehicles from
Retuns
vehicles - table
- Players Vehicles
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
IsVehicleOwner
Checks whether the player is the owner of the given vehicle
Parameters
playerData - table
- PlayerData of the player which you want to check if he is the vehicle owner
Retuns
isOwner - boolean
- whether the player is the owner of the given vehicle
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
HasPlayerKeyOrIsVehicleOwner
Checks whether the player has a key or is vehicle owner
Parameters
playerData - table
- PlayerData of the player which you want to check if he has a key
plate - string
- Vehicle Plate
model - number
- Vehicle Model
Retuns
hasKeyOrIsOwner - boolean
- whether the player has a key or is vehicle owner
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
GetPlayerKeysAndVehicles
Gets the player keys and owned vehicles
Parameters
playerData - table
- PlayerData of the player which you want to get the keys and vehicles from
Retuns
vehicles - table
- Players Vehicles
keys - table
- Players Vehicle Keys
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
AddKey
Adds a key to the player
Parameters
playerData - table
- PlayerData of the player to whom you want to add the key
plate - string
- Vehicle Plate
type - string
- Key Type ['primary', 'secondary', 'temporary']
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
AddPrimaryKey
Adds a primary key to the player
Parameters
playerData - table
- PlayerData of the player to whom you want to add the primary key
plate - string
- Vehicle Plate
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
AddSecondaryKey
Adds a secondary key to the player
Parameters
playerData - table
- PlayerData of the player to whom you want to add the secondary key
plate - string
- Vehicle Plate
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
AddTempKey
Adds a temporary key to the player
Parameters
playerData - table
- PlayerData of the player to whom you want to add the temporary key
plate - string
- Vehicle Plate
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
RemoveKey
Removes the key from the player
Parameters
playerData - table
- PlayerData of the player to whom you want to remove the key
plate - string
- Vehicle Plate
type - string
- Key Type ['primary', 'secondary', 'temporary']
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
RemovePrimaryKey
Removes the primary key from the player
Parameters
playerData - table
- PlayerData of the player to whom you want to remove the primary key
plate - string
- Vehicle Plate
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
RemoveSecondaryKey
Removes the secondary key from the player
Parameters
playerData - table
- PlayerData of the player to whom you want to remove the secondary key
plate - string
- Vehicle Plate
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
RemoveTempKey
Removes the temporary key from the player
Parameters
playerData - table
- PlayerData of the player to whom you want to remove the temporary key
plate - string
- Vehicle Plate
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
- Use this if the player is not Online
ExchangeVehicleLocks
Exchange the vehicle locks of the given vehicle. All Keys that other players might have for this vehicle will be deleted.
Parameters
playerData - table
- PlayerData of the player who is the vehicle owner
plate - string
- Vehicle Plate
Description
For the Parameter playerData
you can set:
{source = playerId}
{identifier = playerIdentifier}
TransferVehicle
The given vehicle will be transfered to the given player
Parameters
ownerData - table
- PlayerData of the player who is the current vehicle owner
targetData - table
- PlayerData of the player who gets the vehicle
plate - string
- Vehicle Plate
Description
For the Parameter ownerData
or targetData
you can set:
{source = playerId}
{identifier = playerIdentifier}
Last updated