Exports & Events

Client Exports


chevron-rightEnterhashtag

Enters building based on given context.

Parameters

  • context: context

  • doorIndex?: number

chevron-rightExithashtag

Exits current building.

Parameters

  • doorIndex: number

  • force?: boolean

chevron-rightGetClosestBuildinghashtag

Parameters

  • radius?: number (default = 3.0)

Returns

  • context?: context

chevron-rightHasAccesshashtag

Parameters

  • houseId?: number (default current house)

Returns

  • hasAccess: boolean

Client Events


chevron-rightno-housing:furniture:uihashtag

Toggles furniture editor if player has access in current house.

chevron-rightno-housing:furniture:ui:closehashtag

Closes furniture editor.

chevron-rightno-housing:housemanager:createhashtag

Opens house creation.

chevron-rightno-housing:housemanager:edithashtag

Opens house editor for closest house.

chevron-rightno-housing:realestate:showhashtag

Opens real estate menu.

Server Exports


chevron-rightGetPlayerHouseshashtag

Returns the list of houses the player has access to.

Parameters

  • source: number

Returns

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

chevron-rightGetPlayerHousesByUserIdhashtag

Returns the list of houses the player has access to.

Parameters

  • userId: number

Returns

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

chevron-rightGetAccesseshashtag

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

Parameters

  • houseId: number

Returns

  • userIdList: number[]

chevron-rightIsOwnerhashtag

Returns whether the player owns the given house.

Parameters

  • houseId: number

  • source: number

Returns

  • isOwner: boolean

chevron-rightIsOwnedByUserIdhashtag

Returns whether the player owns the given house.

Parameters

  • houseId: number

  • userId: number

Returns

  • isOwner: boolean

chevron-rightHasAccesshashtag

Returns whether the player has access to the given house.

Parameters

  • houseId: number

  • source: number

Returns

  • hasAccess: boolean

chevron-rightHasAccessByUserIdhashtag

Returns whether the player has access to the given house.

Parameters

  • houseId: number

  • userId: number

Returns

  • hasAccess: boolean

chevron-rightGiveAccesshashtag

Gives the player access to the given house.

Parameters

  • houseId: number

  • source: number

Returns

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

chevron-rightGiveAccessByUserIdhashtag

Gives the player access to the given house.

Parameters

  • houseId: number

  • userId: number

Returns

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

chevron-rightRemoveAccesshashtag

Removes player access from given house.

Parameters

  • houseId: number

  • source: number

Returns

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

chevron-rightRemoveAccessByUserIdhashtag

Removes player access from given house.

Parameters

  • houseId: number

  • userId: number

Returns

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

chevron-rightResetAccesseshashtag

Resets house accesses.

Parameters

  • houseId: number

Returns

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

chevron-rightShareAccesshashtag

Shares access with given target if player has permission.

Parameters

  • houseId: number

  • source: number

  • targetSource: number

Returns

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

chevron-rightShareAccessByUserIdhashtag

Shares access with given target if player has permission.

Parameters

  • houseId: number

  • source: number

  • targetUserId: number

Returns

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

chevron-rightRemoveAccesWithPermissionhashtag

Removes given target's access if player has permission.

Parameters

  • houseId: number

  • source: number

  • targetId: number

Returns

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

chevron-rightResetAccessesWithPermissionhashtag

Resets house accesses if player has permission.

Parameters

  • houseId: number

  • source: number

Returns

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

Last updated