Page 1 of 1

Weapon-dependant gravity

Posted: Mon Nov 22, 2021 2:16 pm
by greenie
Weapon-dependant gravity

This is probably the shortest and the most "codeless" plugin ever made. I didn't think it would be THIS easy when I got this idea, but well... it was. It's up to the approvers whether they'll approve these few lines of code or not.


Description
This plugin changes users gravity according to all the weapons they currently hold. The weight of weapons should be realistic, found the values on wikipedia . For example, if the user holds a M249, their gravity would be increased to somewhere around 120%. However, if they hold both Desert Eagle and M249, it will be 130% (just a guess). Tested, works well.

Cvars
None. If you got an idea for a cvar, drop it in this topic.

Changelog

0.1
Now counts all weapons in user's inventory
More optimized
Uses HamSandwich hooks instead of CurWeapon
Changed to work with flashbangs as well; other grenades are still counted as 1 though

Counter-Strike only

plugin
source