Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: PSL on Mar 25, 2023, 07:34 AM

Title: How can crouching be prohibited
Post by: PSL on Mar 25, 2023, 07:34 AM
How do I disable crouching, I've tried a lot of things like actions, skins, weapon Settings, and it doesn't work very well, my current solution is to modify the firing motion of the weapon, but I want to do it better, like the crouching button doesn't exist.
Title: Re: How can crouching be prohibited
Post by: 2b2ttianxiu on Mar 25, 2023, 09:56 AM
U can try player.Anim?
Title: Re: How can crouching be prohibited
Post by: habi on Mar 27, 2023, 04:35 AM
Use onGameKeysChange(player, oldkey,  newkey).  Then bitwise AND with number corresponding to crouching.
Title: Re: How can crouching be prohibited
Post by: PSL on Apr 08, 2023, 01:22 AM
The password for this key is 256,288. My return false does not disable these keys
Title: Re: How can crouching be prohibited
Post by: habi on Apr 08, 2023, 01:51 AM
Instead of returning false,  did you tried setting Animation or
player.Pos=player.Pos
Title: Re: How can crouching be prohibited
Post by: PSL on Apr 08, 2023, 01:00 PM
I've tried. I've never been the same as lw,Thanks for your advice
Title: Re: How can crouching be prohibited
Post by: Diego^ on Apr 09, 2023, 01:09 AM
Quote from: PSL on Apr 08, 2023, 01:00 PMI've tried. I've never been the same as lw,Thanks for your advice

Use SetWeaponDataValue (http://wiki.thijn.ovh/index.php?title=Scripting/Squirrel/Functions/SetWeaponDataValue), with it you can make it impossible to crouch with weapon in hand.
Title: Re: How can crouching be prohibited
Post by: PSL on Apr 29, 2023, 03:09 AM
The problem has been solved. Thank you all for your help.
Title: Re: How can crouching be prohibited
Post by: Ridwan Rz on Apr 30, 2023, 03:22 AM
Quote from: PSL on Apr 29, 2023, 03:09 AMThe problem has been solved. Thank you all for your help.

Hey, mind telling us the solution? It would be helpful for those who trying to remove crouch as well :D
Title: Re: How can crouching be prohibited
Post by: PSL on Apr 30, 2023, 02:00 PM
I changed the shotgun data, changing the firing action to standing fire! SetWeaponDataValue(19,24,0);