Skip to main content

Server Exports

GetOwnedHomes​

This export will return the owned homes of the player.

    exports.bcs_housing:GetOwnedHomes(identifier)

Parameter​

  • identifier it accepts the player identifier, citizenid for QB

Returned Data (Object)​

KeyData TypeDescription
identifierstringThe home identifier
namestringThe home name / label
type'mlo' or 'shell'The home type
pricenumberThe home price
garageObject (x, y, z)The coordinate of the garage (if there is any)
entryObject (x,y,z)The coordinate of the entrance
lockedbooleanStatus of the house lock for SHELL

GetHomesForSale​

This export will return the owned homes of the player.

    exports.bcs_housing:GetHomesForSale()

Returned Data (Object)​

KeyData TypeDescription
identifierstringThe home identifier
namestringThe home name / label
type'mlo' or 'shell' or 'ipl'The home type
pricenumberThe home price
garageObject (x, y, z)The coordinate of the garage (if there is any)
entryObject (x,y,z)The coordinate of the entrance
lockedbooleanStatus of the house lock for SHELL

isLocked​

Export this function to get the status of the house (Shell) lock

    -- returned data is boolean (true/false)
exports.bcs_housing:isLocked(identifier)

Parameter​

  • identifier the house identifier

GiveKey​

Export this function to give a key to a target (Server Id) with the house ID

    exports.bcs_housing:GiveKey(identifier, GetPlayerServerId(targetPed))

Parameter​

  • identifier it accepts the house identifier
  • source the player server id

RemoveKey​

Export this function to remove a key to a target (Server Id / Player Identifier) with the house ID

    exports.bcs_housing:RemoveKey(identifier, TargetIdentifier)

Parameter​

  • identifier it accepts the house identifier
  • TargetIdentifier it accepts the player identifier, citizenid for QB

HasKey​

Export this function to check if player has key with the house ID

    exports.bcs_housing:HasKey(identifier, source) -- home identifier

Parameter​

  • identifier it accepts the house identifier
  • source the player server id

GetKeyHolders​

This export will return the key holders of a home.

    exports.bcs_housing:GetKeyHolders(identifier) -- home identifier

Parameter​

  • identifier it accepts the house identifier

Returned Data (Array of Objects)​

KeyData TypeDescription
identifierstringThe player identifier
namestringThe player name

LockHome​

    exports.bcs_housing:LockHome(identifier / home)

Parameter​

ParamsData TypeDescription
identifier or homestring or objectHouse identifier or the house data object

RevokePropertyByIdentifier​

    exports.bcs_housing:RevokePropertyByIdentifier(citizenid)

Example Usage​

image