-- Comprehensive Example: Searching a Secure Container
exports['ak47_lib']:StartProgress({
-- Basic UI Settings
duration = 15000, -- Total time: 15 seconds
label = "SEARCHING CONTAINER", -- UI Text
type = "radial-orbit", -- Visual style
canCancel = true, -- Player can press 'X' to stop
-- Animation Settings
anim = {
dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", -- Animation dictionary
clip = "machinic_loop_mechl_worker", -- Animation clip
blendIn = 3.0, -- Fade-in speed
blendOut = 1.0, -- Fade-out speed
flag = 49, -- Upper body animation
lockX = false, -- Don't lock X axis
lockY = false, -- Don't lock Y axis
lockZ = false -- Don't lock Z axis
},
-- Prop Attachment (Flashlight and Crowbar)
prop = {
{
model = "prop_flashlight", -- Model hash or name
bone = 57005, -- Hand bone
pos = vec3(0.1, 0.0, 0.0), -- Relative position
rot = vec3(0.0, 0.0, 0.0) -- Relative rotation
},
{
model = "prop_tool_crowbar",
bone = 18905, -- Left hand
pos = vec3(0.1, 0.1, 0.0),
rot = vec3(0.0, 0.0, 0.0)
}
},
-- State Restrictions
useWhileDead = false, -- Cancel if player dies
allowSwimming = false, -- Cancel if player enters water
allowFalling = false, -- Cancel if player falls
allowRagdoll = false, -- Cancel if player is hit/ragdolled
-- Control Disabling
disable = {
move = true, -- Disable WASD/Space
mouse = false, -- Allow looking around
combat = true, -- Prevent shooting
car = true, -- Prevent entering/driving cars
sprint = true -- Force walking
}
},
function()
-- On Success:
print("Container successfully opened!")
TriggerServerEvent('container:giveRewards')
end,
function()
-- On Cancel:
print("Action interrupted by player.")
end)