Garry's Mod

Garry's Mod

评价数不足
Physgun Fizzle FIXED REUPLOAD
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 快乐
文件大小
发表于
更新日期
14.420 KB
2024 年 5 月 17 日 下午 9:44
2024 年 6 月 24 日 上午 8:23
2 项改动说明 ( 查看 )

订阅以下载
Physgun Fizzle FIXED REUPLOAD

描述
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!