Skip to main content
Multiplayer Farmhouse

Events & Exports

Manage farmhouse properties programmatically, respond to lifecycle and ownership events, and use the included administration commands.

API reference

Export functions

Create, remove or update farmhouse interiors from another server resource.

6 exports
insertInterior

Creates a new farmhouse interior at the specified position.

xnumberynumberznumberpricenumbernamestring
Promise
removeInterior

Removes an existing farmhouse interior.

idnumber
Promise
resetInterior

Resets an interior and clears its ownership-related state.

idnumber
Promise
setInteriorPrice

Updates the purchase price of an existing interior.

idnumberpricenumber
void
setInteriorName

Changes the display name of an existing interior.

idnumbernamestring
void
setInteriorPosition

Updates the position of an existing interior.

idnumberxnumberynumberznumber
void
Event reference

Server events

React to farmhouse ownership changes and player lifecycle activity from another resource.

3 events
onFarmhouseQuit

Triggered when a player disconnects while inside a farmhouse instance.

sourcenumberidnumberxnumberynumberznumber
onFarmhouseTrade

Triggered when a player transfers a farmhouse to another player.

sourcenumberidnumbertargetSourcenumber
onFarmhouseBought

Triggered immediately after a player purchases a farmhouse.

sourcenumberidnumber

Administration commands

The included commands provide quick in-game access to common farmhouse management actions.

/farmhouse_create_at

Create a farmhouse at a specified position.

/farmhouse_create

Create a farmhouse at your current position.

/farmhouse_remove

Remove an existing farmhouse.

/farmhouse_reset

Reset farmhouse ownership and related state.

/farmhouse_set_price

Change the purchase price of a farmhouse.

/farmhouse_set_name

Change the display name of a farmhouse.