# p\_policejob

{% stepper %}
{% step %}

### Replace Files In p\_policejob

find directory `p_policejob/modules/client/handsup.lua`

Replace code inside with this:

```lua
local handsUp = false

local function exportHandler(exportName, func)
    AddEventHandler(('__cfx_export_qb-smallresources%s'):format(exportName), function(setCB)
        setCB(func)
    end)
end

RegisterCommand('p_handsup', function()
	if exports['op-crime']:isRopeActive() or LocalPlayer.state.isDead or exports['p_policejob']:isInCuffProcess() or LocalPlayer.state.PhoneOpen then
		return
	end
	
	if handsUp then
		ClearPedSecondaryTask(cache.ped)
		handsUp = false
		return
	end

	if LocalPlayer.state.isCuffed or LocalPlayer.state.PhoneOpen then
		return
	end

	local animDict = lib.requestAnimDict("random@mugging3")
	TaskPlayAnim(cache.ped, animDict, "handsup_standing_base", 2.0, 2.0, -1, 49, true)
	RemoveAnimDict(animDict)
	handsUp = true
	Citizen.CreateThread(function()
		while handsUp do
			Wait(1)
			DisableControlAction(2, 24, true)
			DisableControlAction(2, 257, true)
			DisableControlAction(2, 25, true)
			DisableControlAction(2, 263, true)
			DisableControlAction(2, 45, true)
			DisableControlAction(2, 37, true)
			DisableControlAction(2, 23, true)
			DisableControlAction(0, 47, true)
			DisableControlAction(0, 264, true)
			DisableControlAction(0, 257, true)
			DisableControlAction(0, 140, true)
			DisableControlAction(0, 141, true)
			DisableControlAction(0, 142, true)
			DisableControlAction(0, 143, true)
			if (IsEntityPlayingAnim(cache.ped, "random@mugging3", "handsup_standing_base", 3) ~= 1) then
				handsUp = false
			end
		end
	end)
end)

RegisterKeyMapping('p_handsup', locale('hands_up'), 'keyboard', 'X') -- X

-- compatible with qb-smallresources
exportHandler('getHandsup', function()
	return handsUp
end)
```

{% endstep %}

{% step %}

### Replace files in op-crime

find directory `op-crime/integrations/client/utils/handsup.lua`

Replace code inside with this:

```lua
handsupDictonary = "random@mugging3"
handsupAnimation = "handsup_standing_base"
handsup = false

function hasHandsUp()
    return handsup
end

function isCuffed(id)
    return LocalPlayer.state.isCuffed
end

function isPedDead(Ped)
    return IsPedDeadOrDying(Ped, true)
end

function isRopeActive()
    return isHandcuffed
end
exports("isRopeActive", isRopeActive)

function ToggleHands()
    
end
```

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otherplanet.dev/scripts/op-gangs/integrations/p_policejob.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
