Giter Club home page Giter Club logo

ragdoller's Introduction

Ragdoller

A simple FiveM script for enabling/disabling ragdolls on any aimed ped.

Setup

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.

Permissions

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.

Player Aiming Weapon

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.

Player Ragdoller

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.

Blips

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

Sounds

Ragdoller plays, by default, different sound while toggling Ragdoller on peds.

To mute Ragdoller, jus set the ENABLE_RAG_SOUND value to false

Controls

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.

Exports

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.