Configuration
Configuration
Everything is configured in config.lua. This page walks through every option.
General
Config.Framework = 'qbox' -- qbox / qbcore / esx / standalone
Config.Command = 'animpos' -- chat command name
Config.Cooldown = 15 -- cooldown between uses (seconds)- Framework — selects the core resource and which metadata restrictions apply.
- Command — the chat command that opens the tool (also used as the keymapping name).
- Cooldown — minimum seconds between uses.
Keybind
Lets players open the tool with a key, rebindable in the GTA V settings.
Config.Keybind = {
Enabled = true,
Default = 'F6', -- default key (empty for none; player can rebind)
}The keymapping is only registered when Enabled = true and Default is not empty. Players can always rebind it under Settings → Key Bindings → FiveM.
Permission (optional)
Restrict who can use the tool. Off by default.
Config.Permission = {
Enabled = false,
Type = 'ace', -- 'ace' / 'job'
Ace = 'animpos.use', -- used when Type == 'ace'
Jobs = { 'police', 'ambulance' }, -- used when Type == 'job'
}ace— checked server-side viaIsPlayerAceAllowedthrough an ox_lib callback (most secure). Grant it withadd_ace ... animpos.use allow.job— the player's framework job name must be in theJobslist (QBox / QB-Core / ESX).
Restrictions
Block usage while the player is in certain states. Native checks work on every framework; metadata checks apply to QBox and QB-Core only.
Config.Restrictions = {
-- Framework based (qbox / qbcore only)
CheckDead = true, -- block while dead
CheckLastStand = true, -- block while in last stand
CheckHandcuffed = true, -- block while handcuffed
-- Native based (works on ALL frameworks incl. standalone)
CheckInVehicle = true, -- block while inside a vehicle
CheckFalling = true, -- block while falling / parachuting
CheckSwimming = false, -- block while swimming
-- Metadata field names read from the player data
MetaKeys = {
Dead = 'isdead',
LastStand = 'inlaststand',
Handcuffed = 'ishandcuffed',
},
}MetaKeys map to the metadata field names on your framework's player data. If your core (or a custom package) stores these under different keys, change them here so the dead / last stand / handcuffed checks read the right values.
Notifications
Choose the backend used for every message.
Config.Notify = 'ox_lib' -- 'ox_lib' / 'qbcore' / 'esx' / 'custom'
-- Only used when Config.Notify == 'custom'.
-- ntype is one of: 'success' / 'error' / 'primary' / 'inform'
Config.CustomNotify = function(message, ntype)
-- exports['my-notify']:SendAlert(message, ntype)
endox_lib—lib.notify(default).qbcore—QBCore:Notifyevent.esx—esx:showNotificationevent.custom— your own handler inConfig.CustomNotify.
An invalid Config.Notify value logs a warning in the server console and safely falls back to ox_lib.
UI
Config.UI = {
Position = 'right', -- left / right / center
OffsetX = 30, -- distance from the edge (px)
OffsetY = 0, -- vertical offset (px)
AccentColor = '#f4cb98', -- accent colour for key highlights / glow
ShowHeader = true, -- show the title/subtitle header
ShowTip = true, -- show the bottom tip line
ShowAnimations = true, -- key press animations
AnimationType = {
Movement = 'pulse', -- pulse / glow
Action = 'glow', -- pulse / glow
}
}Movement
Config.Movement = {
Speed = 0.01, -- movement speed
RotationSpeed = 0.5, -- rotation speed
MaxDistance = 5.0, -- max distance from start (m)
MaxHeight = 3.5, -- max height above start (m)
MinHeight = -3.5, -- min height below start (m)
PrecisionMultiplier = 0.25, -- speed multiplier while holding Precision
}Performance
Config.Performance = {
NetworkUpdateDelay = 50, -- network sync delay (ms)
LoopWait = 0, -- main loop wait (ms)
AnimationDuration = 300, -- UI animation duration (ms)
SyncCooldown = 50, -- server-side anti-spam sync cooldown (ms)
}AnimationDuration is passed to the UI as the transition length for the panel. The sync-related values throttle how often position updates are sent and accepted.
Sounds
Optional GTA V frontend sounds for open / confirm / cancel / reset.
Config.Sounds = {
Enabled = true,
Open = { name = 'SELECT', set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
Confirm = { name = 'SELECT', set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
Cancel = { name = 'CANCEL', set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
Reset = { name = 'RESET_PROMPTS', set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
}Set Enabled = false to mute all sounds.
CanUse hook
A custom check that runs every time a player tries to open the tool. Return true to allow, or false (optionally with a message string) to block.
Config.CanUse = function()
-- Example: block while taking damage
-- local ped = PlayerPedId()
-- if HasEntityBeenDamagedByAnyPed(ped) then
-- return false, 'You cannot do this while taking damage!'
-- end
return true
endControls
The control key scancodes are also fully configurable under Config.Controls (forward, backward, up, down, left, right, rotate, confirm, cancel + two alternates, reset and precision). See the Usage & Controls page for the default layout.