Events & Exports
Manage ranch properties programmatically, respond to lifecycle and ownership events, and use the included administration commands.
Export functions
Create, remove or update ranch interiors from another server resource.
insertInteriorCreates a new ranch interior at the specified position.
xnumberynumberznumberpricenumbernamestringPromiseremoveInteriorRemoves an existing ranch interior.
idnumberPromiseresetInteriorResets an interior and clears its ownership-related state.
idnumberPromisesetInteriorPriceUpdates the purchase price of an existing interior.
idnumberpricenumbervoidsetInteriorNameChanges the display name of an existing interior.
idnumbernamestringvoidsetInteriorPositionUpdates the position of an existing interior.
idnumberxnumberynumberznumbervoidServer events
React to ranch ownership changes and player lifecycle activity from another resource.
onRanchQuitTriggered when a player disconnects while inside a ranch instance.
sourcenumberidnumberxnumberynumberznumberonRanchTradeTriggered when a player transfers a ranch to another player.
sourcenumberidnumbertargetSourcenumberonRanchBoughtTriggered immediately after a player purchases a ranch.
sourcenumberidnumberAdministration commands
The included commands provide quick in-game access to common ranch management actions.
/ranch_create_atCreate a ranch at a specified position.
/ranch_createCreate a ranch at your current position.
/ranch_removeRemove an existing ranch.
/ranch_resetReset ranch ownership and related state.
/ranch_set_priceChange the purchase price of a ranch.
/ranch_set_nameChange the display name of a ranch.