👾 Paid🖥️ Computer‼️ Exports & CommandsExports (Server Side)

Exports (Server Side)

Server-sided exports

SendComputerNotification

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

exports["bd-computer"]:SendComputerNotification(source, message, type)
  • source (number): The player id

  • message (string): The message the player will see

  • type (string): “success”, “error”


ResetContractProgress

Resets the progress of the contract id passed as an argument.

local isDone = exports["bd-computer"]:ResetContractProgress(contractId)
  • contractId (number): The contract id in the database

IsPlayerInStrain

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

local isInStrain = exports["bd-computer"]:IsPlayerInStrain(source)
  • source (number): The player id

GetPlayerStrain

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

local strainData = exports["bd-computer"]:GetPlayerStrain(source)
  • source (number): The player id

GetPlayerStrainUsername

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

local username = exports["bd-computer"]:GetPlayerStrainUsername(source)
  • source (number): The player id

GetGroupLeader

Returns the group leader’s id.

local leaderSrc = exports["bd-computer"]:GetGroupLeader(groupId)
  • groupId (number): - The group id

IsGroupLeader

Returns whether or not the player is the group leader.

local isLeader = exports["bd-computer"]:IsGroupLeader(groupId, playerSource)
  • groupId (number): - The group id

  • playerSource (number): - The player’s id you want to check


GetGroupMembers

Returns the group members by the given group id.

local members = exports["bd-computer"]:GetGroupMembers(groupId)
  • groupId (number): - The group id

FindGroupByMember

Returns the group id of the group the player is in.

local groupId = exports["bd-computer"]:FindGroupByMember(playerSource)
  • playerSource (number): - The player’s id

GetJobStatus

Returns the group id of the group the player is in.

local status = exports["bd-computer"]:GetJobStatus(groupId)
  • groupId (number): - The group’s id

SetJobStatus

Sets the job status for the given group

exports["bd-computer"]:SetJobStatus(groupId, status)
  • groupId (number): - The group’s id

  • status (string): - The status to set


GetGroupMembersCount

Returns the amount of members in the group

local membersAmount = exports["bd-computer"]:GetGroupMembersCount(groupId)
  • groupId (number): - The group’s id

CreateBlipForGroup

Creates a blip for everyone in the group.

--[[ 
local blipData = {
    coords = Jobs[groupId]['CocaineSuppliesLocation'],
    color = 37,
    alpha = 255,
    sprite = 514,
    scale = 0.62,
    label = "Cocaine Supplies",
    route = true,
    routeColor = 1,
}
]]--
 
exports["bd-computer"]:CreateBlipForGroup(groupId, blipName, blipData)
  • groupId (number): - The group’s id

  • blipName (string): - The blip name that the blip will be identified by

  • blipData (table): - The blip data


RemoveBlipForGroup

Removes the blip by the given name for the group.

exports["bd-computer"]:RemoveBlipForGroup(groupId, blipName)
  • groupId (number): - The group’s id

  • blipName (string): - The blip’s name created with


DestroyGroup

Destroys the given group.

exports["bd-computer"]:DestroyGroup(groupId)
  • groupId (number): - The group’s id

NotifyGroup

Sends a notification to everyone in the group.

exports["bd-computer"]:NotifyGroup(groupId, message, timeout)
  • groupId (number): - The group’s id

  • message (string): - The message of the notification

  • timeout (number): - The time for the notification to dissappear (in milliseconds)


DoesGroupExist

Returns whether or not the given group id exists.

local exists = exports["bd-computer"]:DoesGroupExist(groupId)
  • groupId (number): - The group’s id

FinishContract

Finishes the started contract for the group. It makes the contract expire and starts resetting.

exports["bd-computer"]:FinishContract(groupId)
  • groupId (number): - The group’s id

setCryptoToComputerName

Adds crypto to the current amount by computer username.

local state = exports["bd-computer"]:setCryptoToComputerName(name, amount)
  • name (string): - The computer username
  • amount (number): - The amount of coins to add to current coins

DoesComputerExistsByName

Checks if computer exist by computer username.

local exists = exports["bd-computer"]:DoesComputerExistsByName(name)
  • name (string): - The computer username