NOTICE (4th May. 2021): The development version of this resource currently replaces the floating ads animation with the default stealth animation. This is the best implementation i’ve found so far and I’ll upload the next version after I cleaned up the code. My to-do list has been updated to include an export function for walk-styles to fix compatibility issues with other resources. If you have a request to make this mod compatible with another mod then plese mention that in the comments.
NOTICE (23st Apr. 2021): I’m back and have started working on this script again. So far I have found several workarounds to the “hovering above ground” bug that involve disabling the native aim camera. The result is the player no longer hovering above ground while aiming at the cost of aim zoom. THIS PROJECT IS OPEN SOURCE so feel free to use, modify and/or release my code as you please as long as credit is given. You can also contact me via Discord for support of any kind: Eddie#6034
I’ve noticed that current crouch scripts out there are somewhat clunky so i decided to make full use of the games’ native animation system to create smooth transitions and make it less intrusive control-wise.
Fixed an issue where spamming the crouch button causes head-bobbing (due to the game trying to enter stealth mode inbetween ticks) and allows some weapons to shoot faster while doing so (Thanks to Auraa for reporting the issue).
v0.93 Alpha
Added weapon animations to prevent clipping. This currently only discriminates based on weapon type so some more special weapons are still clipping.
Fixed an issue where playermodels are floating above the ground while aiming. The workaround for this can be adjusted in the main.lua config section. Mode 3 entirely removes the native aim mode. This means that you are no longer able to zoom in with weapons or use the sniper scope.
Disabled first person camera for when crouching due to missing first person animations.
With this version, you can no longer walk fast while aiming standing up, it defaults you to walk slow only while aiming and standing so I cannot use this.
Is there no way now to edit it so when not crouched, just normally there, and you aim a gun, it doesn’t make you in stealth mode automatically, like not crouching or anything it’s automatically making my character walk slow “stealth mode” while aiming and shift doesn’t make me run faster…
else
cor.actionmodeoff = true
SetPedUsingActionMode(playerped, false, -1, "DEFAULT_ACTION")
if IsPlayerFreeAiming(player) then
SetPedMaxMoveBlendRatio(playerped, 1.0)
SetPedStealthMovement(playerped, true, "DEFAULT_ACTION")
stealth.on = true
--notify("PLAYER AIMING")
else
SetPedStealthMovement(playerped, false, "DEFAULT_ACTION")
stealth.on = false
if IsAimCamActive() or IsAimCamThirdPersonActive() then
--notify("PLAYER FREE-AIMING")
SetPedMaxMoveBlendRatio(playerped, 10.0)
else
SetPedMaxMoveBlendRatio(playerped, 10.0)
end
end
In the main.lua just remove that whole part at the end and that should fix it you should be able to run again while aiming while not being crouched Idk or think it removed any other essential part of the script because I just did that and the script is still running fine withoutn that part
yeah but just noticed that to actually start crouching you need to move after pressing ctrl if you just press it and don’t move then you just keep standing after deleting the part of the main.lua
Alternatively you can just increase the blend-ratio for a faster speed. If I remember correctly that line is actually needed to reset the speed from beeing crouched.
I can crouch when I use him, but he loses his left Ctrl alert status. I’ve tried to change his buttons, but again I can’t use the alert state, is there any way to make them compatible?