Skill Check
Run DynamicHUD skill checks directly or replace ox_lib skill checks without changing call sites.
Skill Check
skillCheck yields the calling Lua thread until the player succeeds, fails, cancels, or reaches the 60-second safety timeout. It returns true only when every configured step succeeds.
local success = exports['orbit-dynamichud-v2']:skillCheck('medium', { 'E', 'Q' })
if success then
print('Skill check passed')
else
print('Skill check failed or was cancelled')
endDifficulty
| Preset | Success area | Speed multiplier |
|---|---|---|
easy | 50 | 1.0 |
medium | 40 | 1.5 |
hard | 25 | 1.75 |
Pass an array for sequential checks. Each successful step advances to the next:
local success = exports['orbit-dynamichud-v2']:skillCheck({
'easy',
'medium',
{ areaSize = 30, speedMultiplier = 1.9 }
}, { 'E', 'Q', 'SPACE' })areaSize is clamped from 1 to 360. speedMultiplier has a minimum of 0.1. Inputs are normalized to uppercase; SPACEBAR becomes SPACE, ESCAPE becomes ESC, and no input table defaults to E.
Only one skill check can run at once. A second call returns false immediately.
if exports['orbit-dynamichud-v2']:skillCheckActive() then
exports['orbit-dynamichud-v2']:cancelSkillCheck()
endox_lib drop-in replacement
lib = lib or {}
lib.skillCheck = function(difficulty, inputs)
return exports['orbit-dynamichud-v2']:skillCheck(difficulty, inputs)
end
lib.skillCheckActive = function()
return exports['orbit-dynamichud-v2']:skillCheckActive()
end
lib.cancelSkillCheck = function()
return exports['orbit-dynamichud-v2']:cancelSkillCheck()
endThe difficulty, input, active-state, cancellation, and boolean return contracts match the ox_lib calls, so existing gameplay branches remain unchanged.
The local client event orbit-dynamichud:skillCheckOver fires when NUI submits a result. Normal gameplay code should use the blocking return value.