Garry's Mod

Garry's Mod

87 个评价
Physgun Fizzle
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 快乐
文件大小
发表于
更新日期
13.331 KB
2020 年 5 月 10 日 上午 1:59
2020 年 5 月 16 日 下午 3:59
4 项改动说明 ( 查看 )

订阅以下载
Physgun Fizzle

描述
What is this?
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!
12 条留言
>KB> >KEKSQUAD 2024 年 3 月 29 日 下午 3:25 
Hey if anyone here is interested in a fix, you can decompile this addon and move the sv_physfiz_unjam CreateConvar line in sh_config.lua BEFORE the "if SERVER then" line; this makes the convar "known" to clients, but unchangeable by clients. The reason that the Lua error in the original occurs is due to the convar not being "known" to clients. I have previously tested this on my server after an Antlion Guard hit me when I had my physgun out, and it appears to work fine without errors.
cumpuddle228 2023 年 8 月 26 日 上午 10:54 
if works jus PLZ get rid of the lua error every time it works its annoying af
Veldigoob 2023 年 1 月 18 日 上午 8:21 
lmao finally i found the anti propkiller addon
Tye-Wynd 2021 年 8 月 1 日 下午 12:30 
i need one so i can give a prop some sort of effect where only I (the person who activated it) can use the physgun on, but, its a good addon!
Corvet Eagrdown 2021 年 3 月 5 日 下午 8:56 
phyzzlegun
>KB> >KEKSQUAD 2020 年 10 月 26 日 下午 10:01 
[ERROR] lua/physgunfizzle/sh_fizzle.lua:25: attempt to index a nil value
1. fn - lua/physgunfizzle/sh_fizzle.lua:25
2. unknown - lua/ulib/shared/hook.lua:109
>KB> >KEKSQUAD 2020 年 10 月 14 日 下午 3:00 
Boi that is more complicated that it sounds
8Z  [作者] 2020 年 5 月 16 日 下午 2:52 
@AppleJack Good idea - let me try implementing that.
8Z  [作者] 2020 年 5 月 15 日 上午 3:17 
@stevensky That shouldn't be difficult to implement.
stevensky 2020 年 5 月 15 日 上午 1:49 
would be nice if fizzled players couldn't spawn props as well, nice addon!