Skip to main content
Multiplayer Winery

Events & Exports

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

API reference

Export functions

Create, remove or update winery instances from another server resource.

6 exports
insertInstance

Creates a new winery instance at the specified position.

xnumberynumberznumberpricenumbernamestring
Promise
removeInstance

Removes an existing winery instance.

idnumber
Promise
resetInstance

Resets an instance and clears its ownership-related state.

idnumber
Promise
setInstancePrice

Updates the purchase price of an existing instance.

idnumberpricenumber
Promise
setInstanceName

Changes the display name of an existing instance.

idnumbernamestring
Promise
setInstancePosition

Updates the position of an existing instance.

idnumberxnumberynumberznumber
Promise
Event reference

Server events

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

5 events
onWineryQuit

Triggered when a player disconnects while inside a winery instance.

playerSourcenumberidnumberxnumberynumberznumber
onWineryTrade

Triggered when a player transfers a winery to another player.

playerSourcenumberidnumbertargetSourcenumber
onWineryBought

Triggered immediately after a player purchases a winery.

playerSourcenumberidnumber
onWineryEnter

Triggered when a player enters a winery instance.

playerSourcenumberidnumber
onWineryLeave

Triggered when a player leaves a winery instance.

playerSourcenumberidnumber

Administration commands

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

/winery_create

Create a winery at your current position.

/winery_remove

Remove an existing winery.