1 Screenshot

About This File

Lets you crouch by pressing CTRL.

 

Installing

  • Put the files you downloaded in their respective places
  • Add require('crouch') to client_packages/index.js
  • All done

 

Notes

  1. Since both this script and walking styles script uses setMovementClipset and resetMovementClipset, they probably won't work at the same time.
  2. Crouching is synced between players.

What's New in Version 1.0.1   See changelog

Released

Replaced entityDataChange with addEventHandler.

  • Like 3
  • Mask 1



User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest

MyNameIsJeff

· Edited by MyNameIsJeff

  

Simple, straight to the point. Thank you!

I've added command functionality if anyone was looking to include it under as one.

PLACE INTO index.js in "client_packages"

// USE /CROUCH TO TOGGLE CROUCH
mp.events.add("playerCommand", (command) => {
    const args = command.split(/[ ]+/);
    const commandName = args[0];
    if (commandName === 'crouch'){
        mp.events.callRemote("toggleCrouch");
    }
});


You MIGHT get some errors on the server side index.js, so if that's the case, just add "data" to the parameters within the function:

mp.events.add("playerDeath", (player, data) => {
    player.data.isCrouched = false;
});

mp.events.add("toggleCrouch", (player, data) => {
    if (player.data.isCrouched === undefined) {
        player.data.isCrouched = true;
    } else {
        player.data.isCrouched = !player.data.isCrouched;
    }
});

 

Share this review


Link to review
hubba

  

great , now i can sneaking........

Share this review


Link to review
matical

  

beast

Share this review


Link to review