config.lua
Preview File Updated: v1.0.1 - 01/17/2026
Config = {}
-- Framework Settings
Config.Framework = 'auto' -- 'auto', 'esx', 'qb', 'qbx' - auto will auto-detect
-- Interaction Settings
Config.Interaction = {
-- Choose interaction method
Method = 'ox_target', -- 'ox_target', 'ox_lib', 'qb-target'
-- Interaction distance
Distance = 2.5,
-- Interaction key (for ox_lib only)
Key = 'E', -- 38 = E key
KeyLabel = '[E]'
}
-- Crutch Removal Settings
Config.Crutch = {
-- Price for crutch removal
Price = 10000,
-- Crutch System Settings
System = {
type = 'wasabi_crutch', -- 'wasabi_crutch', 'custom', or 'remove_prop'
-- If using custom method, choose which ped state to remove
custom = {
removeState = 49, -- State to remove (49 = crutch)
}
},
-- Ped Settings
Ped = {
model = 's_m_m_doctor_01', -- Model hash or name
coords = vector4(294.4607, -597.1277, 42.2965, 68.5619), -- x, y, z, heading
freeze = true,
invincible = true,
blockEvents = true,
scenario = 'WORLD_HUMAN_CLIPBOARD' -- Optional: ped scenario/animation
},
-- Target Options (for ox_target/qb-target) - REMOVED onSelect from here
Target = {
label = 'Physical Therapy',
icon = 'fa-solid fa-user-doctor',
color = '#3498db',
canInteract = function(entity, distance, coords, name, bone)
return distance <= Config.Interaction.Distance
end
},
-- Animation Settings
Animation = {
dict = 'move_m@jogger',
clip = 'idle',
flag = 11,
duration = 10000, -- 10 seconds in milliseconds (reduced for testing)
label = 'Undergoing physical therapy (Jogging)...',
canCancel = false
},
-- UI Settings (for ox_lib)
TextUI = {
text = '${key} Remove Crutch - ${price}$',
position = "right-center",
icon = 'user-doctor',
iconColor = '#3498db'
},
-- 3D Text Settings (for all methods)
DrawText3D = {
enabled = false, -- Disable when using ox_target
offset = vector3(0.0, 0.0, 1.2), -- Offset above ped head
text = 'Physical Therapy',
icon = 'user-doctor',
iconColor = { 52, 152, 219 },
scale = 0.4
},
-- Notifications
Notifications = {
success = {
title = 'Hospital',
message = 'Crutch removed! You paid ${price}',
type = 'success'
},
notEnoughMoney = {
title = 'Hospital',
message = 'You don\'t have enough money!',
type = 'error'
},
failed = {
title = 'Hospital',
message = 'Procedure failed',
type = 'error'
}
}
}
-- Logging Settings
Config.Logging = {
enable = true,
console = true,
format = '[Orbit PT] %s'
}
-- Debug Mode
Config.Debug = true -- Set to true for debugging
-- Validation function
function Config.Validate()
local validMethods = { 'ox_target', 'ox_lib', 'qb-target' }
local validTypes = { 'wasabi_crutch', 'custom', 'remove_prop' }
-- Validate interaction method
local isValidMethod = false
for _, method in ipairs(validMethods) do
if Config.Interaction.Method == method then
isValidMethod = true
break
end
end
if not isValidMethod then
print(string.format(Config.Logging.format,
string.format('ERROR: Invalid interaction method: %s. Using default: ox_target',
Config.Interaction.Method)))
Config.Interaction.Method = 'ox_target'
end
-- Validate crutch system type
local isValidType = false
for _, type in ipairs(validTypes) do
if Config.Crutch.System.type == type then
isValidType = true
break
end
end
if not isValidType then
print(string.format(Config.Logging.format,
string.format('ERROR: Invalid crutch system type: %s. Using default: wasabi_crutch',
Config.Crutch.System.type)))
Config.Crutch.System.type = 'wasabi_crutch'
end
-- Ensure we have the key code for ox_lib
if Config.Interaction.Method == 'ox_lib' then
local keyCodes = {
['E'] = 38,
['F'] = 23,
['G'] = 47
}
Config.Interaction.KeyCode = keyCodes[Config.Interaction.Key] or 38
end
-- Print config status
print(string.format(Config.Logging.format,
string.format('Configuration validated. Method: %s, System: %s',
Config.Interaction.Method, Config.Crutch.System.type)))
end
-- Run validation on load
CreateThread(function()
Wait(1000) -- Wait for everything to load
Config.Validate()
end)Last updated