Exports

Series of exports that will be added as time goes on. These are good for implementing radial menus and usage of 3rd party scripts

Client Exports


ToggleLock
exports.wasabi_carlock:ToggleLock()

Unlocks nearby vehicle(Must have keys)

HasKey
exports.wasabi_carlock:HasKey(PLATE)

Checks if local player has key to plate defined in Plate parameter (Returns true or false)


PLATE: License Plate

GiveKey
exports.wasabi_carlock:GiveKey(PLATE)

Gives local player the key to plate defined in Plate parameter (Returns Plate)


PLATE: License Plate

RemoveKey
exports.wasabi_carlock:RemoveKey(PLATE)

Removes key from local player of plate defined in Plate parameter (Returns true or false)


PLATE: License Plate

GiveKeyMenu
exports.wasabi_carlock:GiveKeyMenu(PLATE)

Checks for close players and provides a menu of them to choose one to give keys to.

If there is no parameter passed (i.e. exports.wasabi_carlock:GiveKeyMenu()); it will attempt to accomplish the same thing as command /givekey. (Will check for nearby vehicle and players to pass keys off from)


PLATE : License Plate OR nil

GetAllKeys
exports.wasabi_carlock:GetAllKeys(TARGET)

Returns an array of plates the player has keys for. If TARGET is not defined or false, will return local player's.

ManageKeysMenu
exports.wasabi_carlock:ManageKeysMenu()

Opens the menu to show all active keys a player has if they have any.

Server Exports


HasKey
exports.wasabi_carlock:HasKey(SERVER_ID, PLATE)

Checks if SERVER_ID has keys to PLATE parameter (Returns true or false)


PLATE: License Plate

SERVER_ID: Server Id

GiveKey
exports.wasabi_carlock:GiveKey(SERVER_ID, PLATE)

Gives SERVER_ID key to PLATE parameter (Returns PLATE)


PLATE: License Plate

SERVER_ID: Server Id

RemoveKey
exports.wasabi_carlock:RemoveKey(SERVER_ID, PLATE)

Removes keys to PLATE from SERVER_ID (Returns true or false)


PLATE: License Plate

SERVER_ID: Server Id

GetAllKeys
exports.wasabi_scripts:GetAllKeys(TARGET)

Returns an array of plates the TARGET player has in their hand.


TARGET : Player source you want to get keys for.

Last updated