Project Zomboid

Project Zomboid

Silencer / Suppressor Mod (Build 41)
HC issues
Hi Nolan, i added 2 Hydrocraft guns and wanted to add silencers too. So .. it would be cool if you would add the HCUzi or move the set soundvolume/radius/sound into the function to detect the silencer type because as it is now you would overwrite another type of silencer written by somebody else (Like me :-D )

if item:getCanon():getType() == "Silencer" then
soundVolume = soundVolume * (0.10)
soundRadius = soundRadius * (0.10)
swingSound = 'silenced_shot'
item:setSoundVolume(soundVolume)
item:setSoundRadius(soundRadius)
item:setSwingSound(swingSound)
elseif item:getCanon():getType() == "HMSilencer" then

soundVolume = soundVolume * (0.25)
soundRadius = soundRadius * (0.25)
swingSound = 'silenced_shot'
item:setSoundVolume(soundVolume)
item:setSoundRadius(soundRadius)
item:setSwingSound(swingSound)
end
Last edited by David Hasihoff; 23 May, 2020 @ 11:42pm