Garry's Mod

Garry's Mod

Not enough ratings
Physgun Fizzle FIXED REUPLOAD
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun
File Size
Posted
Updated
14.420 KB
17 May, 2024 @ 9:44pm
24 Jun, 2024 @ 8:23am
2 Change Notes ( view )

Subscribe to download
Physgun Fizzle FIXED REUPLOAD

Description
What is this?
THIS IS A FIXED REUPLOAD! ORIGINAL ADDON HERE

If you are tired of people building during a battle? And want an organic way to disable that? Physgun Fizzle is for you.

Whenever the player holding something or the held entity took damage, there is a chance that the Physics Gun gets temporarily disabled. When disabled, you cannot drag, freeze or unfreeze with the physgun until a few seconds has passed. This is useful in roleplay or basebuilding gamemodes like DarkRP, BaseWars and PvP-oriented Sandbox servers.

Configuration


You can configure using the options menu, or use the below ConVars.
physfiz_enabled - Set to 0 to disable the features in this addon. Default 1

sv_physfiz_chance_playerhit - The chance of fizzling when the player is shot. Default 0.8
sv_physfiz_chance_prophit - The chance of fizzling when the prop held by the player is shot. Default 0.5
sv_physfiz_chance_damagethreshold - The minimum damage below which the chance of fizzling is reduced. Default 10
sv_physfiz_chance_damagethreshold_linear - Whether to linearly reduce chance when damage is low. If set to 0, damage below threshold will have no chance. Default 1
sv_physfiz_timemin - Minimum amount of time to disable the physgun. Default 7
sv_physfiz_timemax - Maximum amount of time to disable the physgun. Default 10
sv_physfiz_pvponly - Whether only player damage will cause fizzling. Default 0
sv_physfiz_blockprop - "Whether fizzling also blocks prop spawning. Default 1

sv_physfiz_unjam - Whether you can mash keys to unjam the physgun quicker. Default 0
sv_physfiz_unjam_amount - The amount of fizzle time to reduce per button press. Default 0.1

cl_physfiz_sounds - Whether to enable spark sounds. Default 1
cl_physfiz_whiteflash - Whether to force other players' disable flash be white (weapon color can be hard to see). Default 1



Developer Info



SERVER HOOK: PhysgunFizzleChance(ply, isProp, chance)
Calls before the addon calculates a chance to disable physgun. Return a value between 0 and 1 to override the default chance.

SHARED FUNCTION: Player:IsPhysgunFizzling()
Returns true if fizzling is active and false otherwise.

SHARED FUNCTION: Player:AddPhysgunFizzle(t, override)
Start fizzling. If override is true, clears previous fizzling time; otherwise adds to it.



If you think this is a cool idea, Thumbs Up to let others see it too, or Favorite it for later!