Exports (Client Side)

Client-sided exports

SendComputerNotification

Sends a computer notification to the players. Computer must be opened in order for the notification to be shown.

-- Params:
-- @message, string - The message the player will see
-- @type, string - "success", "error"
exports["bd-computer"]:SendComputerNotification(message, type)

-- Example:
exports["bd-computer"]:SendComputerNotification("You have failed the heist!", "error")

FetchCrimeContracts

Returns all robbery contracts in a table.

-- Params:
-- @category, string - The contracts category
exports["bd-computer"]:FetchCrimeContracts(category)

-- Example:
local contracts = exports["bd-computer"]:FetchCrimeContracts("storerobbery")

FetchCrimeContractById

Returns the contract (if one exists) with the given id.

-- Params:
-- @contractId, number - The contracts id from the database
exports["bd-computer"]:FetchCrimeContractById(contractId)

-- Example:
local contract = exports["bd-computer"]:FetchCrimeContractById(1)

FetchContractsCategories

Returns all of the contract categories from shared/config.hq.main

-- Params: None
exports["bd-computer"]:FetchContractsCategories()

-- Example:
local contractCategories = exports["bd-computer"]:FetchContractsCategories()

FetchDeskId

Returns the currently opened computer ID. If a computer isn't opened, returns nil.

-- Params: None
exports["bd-computer"]:FetchDeskId()

-- Example:
local openedComputerId = exports["bd-computer"]:FetchDeskId()

FetchGangDeskId

Returns the computer id of the strain/gang the player is in. If the players isn't in a strain/gang, returns false.

-- Params: None
exports["bd-computer"]:FetchGangDeskId()

-- Example:
local computerId = exports["bd-computer"]:FetchGangDeskId()

FetchMaxMembersPerContract

Returns the maximum amount of people that can be in a contract.

-- Params: None
exports["bd-computer"]:FetchMaxMembersPerContract()

-- Example:
local maxPeople = exports["bd-computer"]:FetchMaxMembersPerContract()

IsPlayerInStrain

Returns whether or not a player is in a strain/gang.

-- Params: None
exports["bd-computer"]:IsPlayerInStrain()

-- Example:
local isInStrain = exports["bd-computer"]:IsPlayerInStrain()

GetPlayerStrain

Returns the strain/gang data of the player if is one. If the player isn't in a strain/gang, returns false.

-- Params: None
exports["bd-computer"]:GetPlayerStrain()

-- Example:
local strainData = exports["bd-computer"]:GetPlayerStrain()

GetPlayerStrainUsername

Returns the players username in his strain/gang. If not in a strain/gang, returns false.

-- Params: None
exports["bd-computer"]:GetPlayerStrainUsername()

-- Example:
local username = exports["bd-computer"]:GetPlayerStrainUsername()

GetMaxMembersPerStrain

Returns the maximum amount of people that can be in a strain/gang.

-- Params: None
exports["bd-computer"]:GetMaxMembersPerStrain()

-- Example:
local maxMembers = exports["bd-computer"]:GetMaxMembersPerStrain()

GetJobStage

Returns the active task for active the contract. If no contract is active for the player, returns "WAITING".

-- Params: None
exports["bd-computer"]:GetJobStage()

-- Example:
local stage = exports["bd-computer"]:GetJobStage()

GetGroupId

Returns the group id for the active contract. If no contract is active for the player, returns -1.

-- Params: None
exports["bd-computer"]:GetGroupId()

-- Example:
local groupId = exports["bd-computer"]:GetGroupId()

IsGroupLeader

Returns whether or not the player is leader of the active contract. If no contract is active for the player, returns false.

-- Params: None
exports["bd-computer"]:IsGroupLeader()

-- Example:
local isLeader = exports["bd-computer"]:IsGroupLeader()

Last updated