Skip to content

A lightweight script that helps aid players with their roleplay by providing new movements - prone, crouch - for player to interact with other players and the environment

License

Notifications You must be signed in to change notification settings

ItsAmmarB/StanceModifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StanceModifier (Javascript Edition)

Credits

JediJosh920 for the original GTA V Mod | [GTA5-Mods]
TimothyDexter for the original CFX post | [cfx.re] [GitHub]

Contributors


Features

  • Ability to go into stealth, crouch, and prone stance.
  • Ability to crawl on stomach and on back.
  • Mappable keys for players customizability.
  • Mappable keys to each stance directly for fast and quick stance changes.
  • Exports for external use.
  • Everything is synchronized.... Everything that works.. is synchronized :p (refer to the issues section down below)

Installation

Download the latest release, extract the resource from the .zip, put the resource in the resources folder, add start StanceModifier to your server.cfg


Controls & Defauly keybinds

  • Next stance = LCTRL (MAPPABLE)

  • Idle (normal) = SPACE (MAPPABLE)

  • Crouch = UNMAPPED (MAPPABLE)

  • Prone = X (MAPPABLE)

  • Prone Flip = X (MAPPABLE)

  • Crawl Forward = W (UNMAPPABLE)

  • Crawl Backward = S (UNMAPPABLE)

  • Crawl Right = D (UNMAPPABLE)

  • Crawl Left = A (UNMAPPABLE)

  • Crawl Aim = Right Mouse (UNMAPPABLE)


Exports

    exports('GetStance', () => Cached.stance) // Gets the current stance of the ped.
    exports('SetStance', Stance => AdvanceStance(Cached.ped, Stance)) // Sets the stance of the ped to the provided stance.

References

    const Stances = { // Types of stances and their corresponding numbers
        Idle: 0,
        Stealth: 1,
        Crouch: 2,
        Prone: {
            Stomach: 3,
            Back: 4
        }
};
    const Movements = { // Types of crawl movements and their corresponding numbers
        Forward: 0,
        Backward: 1,
        Left: 2,
        Right: 3
    };
    const Controls = {
        Forward: 32, // Move Forward (W)
        Backward: 33, // Move Backward (S)
        Right: 34, // Move Right (D)
        Left: 35, // Move Left (A)
        Aim: 25, // Aim (RIGHT MOUSE)
    };
    const Config = {
        FPV: false, // First Person View, 
        FireWhileProne: true,
    }

This is a very useful repository with ton of lists to go through, credits goes to the respective contributors.
happy coding :)


Issues

  • Snipers force 3rd person view due to (SCRIPTED_GUN_TASK_PLANE_WING). [has not been fixed]
  • Ped will be seen standing up while it's aiming on prone. Fourthbeam [has not been fixed]

If you stumbled upon an issue or a bug; make sure to report it by creating an issue card


License: Do what ever you want just don't claim it's yours, give TimothyDexter, JediJosh920 and Contributors credits for the work.

About

A lightweight script that helps aid players with their roleplay by providing new movements - prone, crouch - for player to interact with other players and the environment

Topics

Resources

License

Stars

Watchers

Forks