A simple FiveM script for enabling/disabling ragdolls on any aimed ped.
Just clone this repo to your ressource folder of your FiveM server. You might also need to edit your server.cfg
to
auto-load the resource.
Also, remember that this script won't make Ragdoller-affected ped invincible. Use it wisely, especially while toggling Ragdoller on players.
Remember that Ragdoller doesn't do any permission management. Therefore, it allows EVERY players to activate Ragdoller on any peds.
To prevent this, you can set the ENABLE_AIM_RAGDOLL
value in the Scripts/rag.lua
file to false
. Then, you can use the
exported CheckRagdoller
function to your liking.
This will effectively makes Ragdoller act more like a library than a standalone ressource.
By default, Ragdoller will automatically give any player an empty pistol to enable then to aim at any peds.
To change this, you can set the GIVE_ALL_PLAYERS_WEAPONS
value in the Scripts/rag.lua
file to false
.
Disabling ENABLE_AIM_RAGDOLL
will also prevent players to get pistols too.
By default, the script won't let players toggle Ragdoller on any other players.
To change this, set the ENABLE_RAGDOLL_PLAYER
value in the Scripts/rag.lua
file.
Ragdoller can also add useful blips to every Ragdoller-affected ped.
This is turned off by default, but to enable these, set the RAGDOLL_SHOW_BLIPS
value to true
in the Scripts/pedTag.lua
script
Ragdoller plays, by default, different sound while toggling Ragdoller on peds.
To mute Ragdoller, jus set the ENABLE_RAG_SOUND
value to false
Input | Controls |
---|---|
LEFT ALT (while aiming at ped or vehicles) | Toggles Ragdoller on aimed ped |
H (while aiming) | Disables Ragdoller for all Ragdoller-enabled ped |
If you aim at any occupied vehicle, you can forcibly eject and toggle Ragdoller on all its passagers.
Ragdoller also exports a CheckRagdoller
function that can be called to manage Ragdoller for one frame.
You can repeatedly call CheckRagdoller
every frame and disable/enable it to your liking in any other resources.