Tool Item
Each tool is defined as a key in the tools table with a structured value. Here's a breakdown of the expected fields:
📄 Fields:
Field
Type
Required
Description
label
string
✅
Display name of the item.
weight
integer
✅
Weight in grams (e.g. 1000 = 1kg).
description
string
✅
Description text shown in item UI.
chanceOfBreak
integer
❌
Percent chance (0–100) the tool breaks on use.
holdRotation
vector3
❌
Adjusts the rotation of the held object.
holdOffset
vector3
❌
Adjusts the position offset when held.
model
string
❌
Model name of the object to hold (e.g. "prop_tool_box_04"
).
useable
function
❌
Function to execute when the item is used.
strength
integer
❌
Max supported vehicle weight (in grams). Limits what vehicles this item works on.
💡 Example
tools = {
wrench = {
label = "Wrench",
weight = 1000,
description = "A sturdy wrench for basic repairs.",
chanceOfBreak = 25, -- 25% chance of breaking
holdRotation = vector3(90.0, 0.0, 0.0),
holdOffset = vector3(0.0, -0.15, -0.02),
model = "prop_tool_wrench",
strength = 2000,
useable = function(src)
-- custom usage logic here
end
}
}
Last updated