Editable
Editable
Note: This documentation describes the functions in the
editablefolders. You are free to modify, extend, or adapt to fit your server's needs.
Client Side (client/editable/)
client/editable/)1. keyBinds.lua
keyBinds.luaKey Hints System
showKeyHints(type, subType) Displays key hints for the current editor mode.
type: Main mode (e.g., "building", "rotate", "doors", "upgrade").subType: Optional, for sub-modes.
disableControls() Disables player controls while editing or upgrading.
Keybinds
rotateObjectLeft (
Q): Rotates the object left if free rotation is allowed.rotateObjectRight (
E): Rotates the object right if free rotation is allowed.placeObject (
MOUSE_LEFT): Places the currently selected object.selectObject (
MOUSE_RIGHT): Opens the object selection menu.upgradeObject (
MOUSE_RIGHT): Opens the upgrade menu when in upgrade mode.stopEditing (
X): Stops the editing mode and hides key hints.stopUpgrading (
X): Stops the upgrade mode.useDoor (
E): Uses a door when not editing or upgrading.manageDoor (
G): Opens the door management menu when not editing or upgrading.
Hints Table
Defines which keys are locked and which hints are shown for each mode.
2. events.lua
events.luastopEditor() Stops the editor and upgrade modes, re-enables controls, and hides the UI. Called automatically on player death events.
3. chest.lua
chest.luaOpenChest(chestId) Opens a chest inventory using the
ox_inventorysystem.chestId: The unique identifier of the chest.
Server Side (server/editable/)
server/editable/)1. auth.lua
auth.luacheckAuthAdmin(src) Checks if the player (source) has admin authorization.
Returns
trueif authorized, otherwisefalse.Placeholder for custom admin logic.
2. inventory.lua
inventory.luagetItemCount(source, itemName) Returns the count of a specific item in the player's inventory.
removeItem(source, itemName, count) Removes a specified amount of an item from the player's inventory.
addItem(source, itemName, count) Adds a specified amount of an item to the player's inventory.
3. chest.lua
chest.luaRegisterChest(chestId, slots, weight) Registers a new chest (stash) in the
ox_inventorysystem.chestId: Unique identifier.slots: Number of inventory slots.weight: Maximum weight.
OpenChest(source, chestId) Opens a chest for a player using the
ox_inventorysystem (server-side opening).
Last updated