Exports & Events

Client Exports


Enter

Enters building based on given context.

Parameters

  • context: context

  • doorIndex?: number

Exit

Exits current building.

Parameters

  • doorIndex: number

  • force?: boolean

GetClosestBuilding

Parameters

  • radius?: number (default = 3.0)

Returns

  • context?: context

HasAccess

Parameters

  • houseId?: number (default current house)

Returns

  • hasAccess: boolean

Client Events


no-housing:furniture:ui

Toggles furniture editor if player has access in current house.

no-housing:furniture:ui:close

Closes furniture editor.

no-housing:housemanager:create

Opens house creation.

no-housing:housemanager:edit

Opens house editor for closest house.

no-housing:realestate:show

Opens real estate menu.

Server Exports


GetPlayerHouses

Returns the list of houses the player has access to.

Parameters

  • source: number

Returns

  • houseList: {id: number; address: string; owned: boolean; realestate: Realestate}[]

GetPlayerHousesByUserId

Returns the list of houses the player has access to.

Parameters

  • userId: number

Returns

  • houseList: {id: number; address: string; owned: boolean; realestate: Realestate}[]

GetAccesses

Returns the user ids of players who have access to the house.

Parameters

  • houseId: number

Returns

  • userIdList: number[]

IsOwner

Returns whether the player owns the given house.

Parameters

  • houseId: number

  • source: number

Returns

  • isOwner: boolean

IsOwnedByUserId

Returns whether the player owns the given house.

Parameters

  • houseId: number

  • userId: number

Returns

  • isOwner: boolean

HasAccess

Returns whether the player has access to the given house.

Parameters

  • houseId: number

  • source: number

Returns

  • hasAccess: boolean

HasAccessByUserId

Returns whether the player has access to the given house.

Parameters

  • houseId: number

  • userId: number

Returns

  • hasAccess: boolean

GiveAccess

Gives the player access to the given house.

Parameters

  • houseId: number

  • source: number

Returns

  • result: {success: boolean, message: string}

GiveAccessByUserId

Gives the player access to the given house.

Parameters

  • houseId: number

  • userId: number

Returns

  • result: {success: boolean, message: string}

RemoveAccess

Removes player access from given house.

Parameters

  • houseId: number

  • source: number

Returns

  • result: {success: boolean, message: string}

RemoveAccessByUserId

Removes player access from given house.

Parameters

  • houseId: number

  • userId: number

Returns

  • result: {success: boolean, message: string}

ResetAccesses

Resets house accesses.

Parameters

  • houseId: number

Returns

  • result: {success: boolean, message: string}

ShareAccess

Shares access with given target if player has permission.

Parameters

  • houseId: number

  • source: number

  • targetSource: number

Returns

  • result: {success: boolean, message: string}

ShareAccessByUserId

Shares access with given target if player has permission.

Parameters

  • houseId: number

  • source: number

  • targetUserId: number

Returns

  • result: {success: boolean, message: string}

RemoveAccesWithPermission

Removes given target's access if player has permission.

Parameters

  • houseId: number

  • source: number

  • targetId: number

Returns

  • result: {success: boolean, message: string}

ResetAccessesWithPermission

Resets house accesses if player has permission.

Parameters

  • houseId: number

  • source: number

Returns

  • result: {success: boolean, message: string}

Last updated