{"id":6866,"date":"2024-02-05T09:20:01","date_gmt":"2024-02-05T08:20:01","guid":{"rendered":"https:\/\/esx-scripts.com\/how-to-make-people-walk-when-they-are-handcuffed-modding-tutorials\/"},"modified":"2025-08-27T08:42:53","modified_gmt":"2025-08-27T06:42:53","slug":"enable-handcuffed-walk","status":"publish","type":"post","link":"https:\/\/fivemx.com\/pl\/enable-handcuffed-walk\/","title":{"rendered":"Guide: Allowing Movement While Handcuffed (FiveM) MustHave"},"content":{"rendered":"<p><strong>Guide: Allowing Movement While Handcuffed (FiveM)<\/strong>  <\/p>\n<p>In role\u2011play servers with FiveM, handcuffs add a touch of realism and tension. Many players discover that the default freezing behavior can be too restrictive, making the experience feel artificial. This guide shows you how to let players move while handcuffed across all popular frameworks\u2014QBCore, ESX, and vRP\u2014while still preventing the most obvious actions like shooting or driving.  <\/p>\n<p>&#8212;<\/p>\n<h2>Understanding the Handcuffing Flow  <\/h2>\n<p>When a player is handcuffed, the server typically toggles a few client\u2011side settings:<br \/>\n<em> The handcuff animation plays (e.g., `&#8217;mp_arresting&#8217;, &#8216;idle&#8217;`).<br \/>\n<\/em> Handcuff controls are enabled (`SetEnableHandcuffs`).<br \/>\n<em> The entity is usually frozen to lock the player in place.  <\/p>\n<p>To allow movement, you need to unfreeze the entity <strong>before<\/strong> keeping all other restrictive controls active. The challenge is to locate the exact lines in each framework and adjust them without breaking your existing logic.  <\/p>\n<p>&#8212;<\/p>\n<h2>QBCore Framework (and QBOX) \u2013 Step\u2011by\u2011Step  <\/h2>\n<h3>1. Find the Handcuff Code  <\/h3>\n<p>Search the police job or utility scripts for the cue that triggers handcuffing. It normally looks like:<br \/>\n&#8220;`lua<br \/>\nTaskPlayAnim(playerPed, &#8216;mp_arresting&#8217;, &#8216;idle&#8217;, 8.0, -8, -1, 49, 0, 0, 0, 0)<br \/>\nSetEnableHandcuffs(playerPed, true)<br \/>\nFreezeEntityPosition(playerPed, true)<br \/>\n&#8220;`<\/p>\n<h3>2. Enable Movement  <\/h3>\n<p>Replace the freeze call:<br \/>\n&#8220;`lua<br \/>\nFreezeEntityPosition(playerPed, false)   &#8212; Allows free walking<br \/>\n&#8220;`<\/p>\n<p>Your updated snippet becomes:<br \/>\n&#8220;`lua<br \/>\nTaskPlayAnim(playerPed, &#8216;mp_arresting&#8217;, &#8216;idle&#8217;, 8.0, -8, -1, 49, 0, 0, 0, 0)<br \/>\nSetEnableHandcuffs(playerPed, true)<br \/>\nFreezeEntityPosition(playerPed, false)<br \/>\n&#8220;`<\/p>\n<h3>3. Keep Controls Restricted  <\/h3>\n<p>Create a continuous thread that disables the potentially problematic actions:<br \/>\n&#8220;`lua<br \/>\nCitizen.CreateThread(function()<br \/>\n    while true do<br \/>\n        Citizen.Wait(10)<br \/>\n        if IsHandcuffed then<br \/>\n            DisableControlAction(0, 24, true)  &#8212; Attack<br \/>\n            DisableControlAction(0, 25, true)  &#8212; Aim<br \/>\n            DisableControlAction(0, 142, true) &#8212; MeleeAttackAlternate<br \/>\n            DisableControlAction(0, 75, true)   &#8212; Leave Vehicle<br \/>\n            DisableControlAction(0, 92, true)   &#8212; Shoot in vehicle<br \/>\n        ko\u0144cu<br \/>\n    ko\u0144cu<br \/>\nend)<br \/>\n&#8220;`<br \/>\nReplace `IsHandcuffed` with the variable that indicates the do\u2011handcuff state for your specific script.  <\/p>\n<p>&#8212;<\/p>\n<h2>ESX Framework \u2013 How to Do It  <\/h2>\n<h3>1. Locate the Main Handcuff Section  <\/h3>\n<p>Find `esx_policejob\/client\/main.lua` and locate the following code:<br \/>\n&#8220;`lua<br \/>\nTaskPlayAnim(playerPed, &#8216;mp_arresting&#8217;, &#8216;idle&#8217;, 8.0, -8, -1, 49, 0, 0, 0, 0)<br \/>\nSetEnableHandcuffs(playerPed, true)<br \/>\nSetPedCanPlayGestureAnims(playerPed, false)<br \/>\nFreezeEntityPosition(playerPed, true)<br \/>\n&#8220;`<\/p>\n<h3>2. Remove the Freeze  <\/h3>\n<p>Change `FreezeEntityPosition(playerPed, true)` to `false` so that walking is possible.  <\/p>\n<h3>3. Disable Key Controls  <\/h3>\n<p>Implement a similar thread to keep weapons and vehicle controls at bay:<br \/>\n&#8220;`lua<br \/>\nCitizen.CreateThread(function()<br \/>\n    while true do<br \/>\n        Citizen.Wait(10)<br \/>\n        if IsHandcuffed then<br \/>\n            DisableControlAction(0, 142, true) &#8212; MeleeAttackAlternate<br \/>\n            DisableControlAction(0, 30, true)  &#8212; MoveLeftRight<br \/>\n            DisableControlAction(0, 31, true)  &#8212; MoveUpDown<br \/>\n            DisableControlAction(0, 24, true)  &#8212; Shoot<br \/>\n            DisableControlAction(0, 92, true)  &#8212; Shoot in car<br \/>\n            DisableControlAction(0, 75, true)  &#8212; Leave Vehicle<br \/>\n        ko\u0144cu<br \/>\n    ko\u0144cu<br \/>\nend)<br \/>\n&#8220;`<br \/>\nBe sure to link `IsHandcuffed` to your ESX handcuff flag.<\/p>\n<p>&#8212;<\/p>\n<h2>vRP \u2013 Customizing Movement  <\/h2>\n<h3>1. Find the Handcuff Declaration  <\/h3>\n<p>The core logic often resides in `vrp\/modules\/police.lua` or a custom resource. Look for:<br \/>\n&#8220;`lua<br \/>\nvRPclient.playAnim(player, {true, {{mp_arresting, idle}}, true})<br \/>\nvRPclient.setHandcuffed(player, true)<br \/>\nvRPclient.setFreeze(player, true)<br \/>\n&#8220;`<\/p>\n<h3>2. Unfreeze for Movement  <\/h3>\n<p>Swap the freeze line:<br \/>\n&#8220;`lua<br \/>\nvRPclient.setFreeze(player, false)<br \/>\n&#8220;`<\/p>\n<h3>3. Lock Specific Actions  <\/h3>\n<p>Insert or modify a client script to continuously disable undesired controls:<br \/>\n&#8220;`lua<br \/>\nCitizen.CreateThread(function()<br \/>\n    while true do<br \/>\n        Citizen.Wait(10)<br \/>\n        if IsHandcuffed then<br \/>\n            DisableControlAction(0, 24, true)  &#8212; Attack<br \/>\n            DisableControlAction(0, 25, true)  &#8212; Aim<br \/>\n            DisableControlAction(0, 142, true) &#8212; MeleeAttackAlternate<br \/>\n            DisableControlAction(0, 75, true)   &#8212; Leave Vehicle<br \/>\n            DisableControlAction(0, 92, true)   &#8212; Shoot in vehicle<br \/>\n            DisableControlAction(0, 30, true)  &#8212; Move Left\/Right<br \/>\n            DisableControlAction(0, 31, true)  &#8212; Move Up\/Down<br \/>\n        ko\u0144cu<br \/>\n    ko\u0144cu<br \/>\nend)<br \/>\n&#8220;`<\/p>\n<h3>4. Sync the Handcuff Flag  <\/h3>\n<p>Define a global variable and listen for a server\u2011side event:<br \/>\n&#8220;`lua<br \/>\nlocal IsHandcuffed = false<br \/>\nRegisterNetEvent(&#8216;vrp:handcuff&#8217;)<br \/>\nAddEventHandler(&#8216;vrp:handcuff&#8217;, function(status)<br \/>\n    IsHandcuffed = status<br \/>\nend)<br \/>\n&#8220;`<br \/>\nTrigger this event whenever a player is handcuffed or released.<\/p>\n<p>&#8212;<\/p>\n<h2>Final Considerations  <\/h2>\n<p><\/em> <strong>Test thoroughly<\/strong> on a copy of your server before pushing changes live.<br \/>\n<em> Adjust the `DisableControlAction` list to match your role\u2011play rules\u2014some servers may want to allow certain movements or swaps.<br \/>\n<\/em> Always keep your variables clear and consistent; placeholders like `IsHandcuffed` must be tied to actual script flags.  <\/p>\n<p>&#8212;<\/p>\n<p><strong>Conclusion \u2013 Your Ultimate Handcuff Mobility Blueprint<\/strong>  <\/p>\n<p>By following this <strong>Guide: Allowing Movement While Handcuffed (FiveM)<\/strong>, you can introduce realistic handcuff mechanics that let players walk around while still feeling the restrictions of being restrained. This approach retains immersive gameplay for QBCore, ESX, and vRP servers, making role\u2011play encounters smoother and more engaging for everyone.<\/p>","protected":false},"excerpt":{"rendered":"<p>Want handcuffed players to move around in FiveM without losing realism? Our friendly guide walks you through easy code tweaks for QBCore, ESX, and vRP, enabling movement while keeping the unwanted actions disabled.<\/p>","protected":false},"author":1,"featured_media":174476,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2877,1900,1899],"tags":[],"class_list":["post-6866","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-free-fivem-job-scripts","category-troubleshooting","category-tutorials"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/6866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/comments?post=6866"}],"version-history":[{"count":0,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/6866\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/media\/174476"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/media?parent=6866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/categories?post=6866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/tags?post=6866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}