Editable
Editable
Note: This documentation describes the functions in the
editable
folders. You are free to modify, extend, or adapt to fit your server's needs.
Client Side (client/editable/
)
client/editable/
)1. keyBinds.lua
keyBinds.lua
Key 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.lua
stopEditor() Stops the editor and upgrade modes, re-enables controls, and hides the UI. Called automatically on player death events.
3. chest.lua
chest.lua
OpenChest(chestId) Opens a chest inventory using the
ox_inventory
system.chestId
: The unique identifier of the chest.
Server Side (server/editable/
)
server/editable/
)1. auth.lua
auth.lua
checkAuthAdmin(src) Checks if the player (source) has admin authorization.
Returns
true
if authorized, otherwisefalse
.Placeholder for custom admin logic.
2. inventory.lua
inventory.lua
getItemCount(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.lua
RegisterChest(chestId, slots, weight) Registers a new chest (stash) in the
ox_inventory
system.chestId
: Unique identifier.slots
: Number of inventory slots.weight
: Maximum weight.
OpenChest(source, chestId) Opens a chest for a player using the
ox_inventory
system (server-side opening).
Last updated