I have added some alternative weapon_zm_improvised models to the pointshop to replace the crowbar. They all seem to function just like I would have hoped except from the fact the sometimes spectators have them equipped on death. The code for the replacement melee weapons is just your typical weapon_zm_improvised script with the loadouts removed, names and models changed.
ITEM.Name = ‘Sledgehammer’
ITEM.Price = 300000
ITEM.Model = ‘models/weapons/w_sledgehammer.mdl’
ITEM.WeaponClass = ‘weapon_zm_sledgehammer’
ITEM.SingleUse = false
I’m not sure but I think the bug is similar to how the trails sometimes stay on.
So, essentially I’m left with a load of traitors getting the crap beaten out of them by invisible people with lightsabers and bats. I’ve had a few ideas on how to fix this but don’t have enough knowledge in Lua to carry them through without being told the code to remove/add.
So my solutions to this are:
- Disable pointshop while in spectate mode (opening the pointshop as a spectator seems to make the weapon appear)
- Something that makes the swep do no damage if they’re spectator if ( player:Team() != TEAM_SPECTATOR ) then SWEP.Primary.Damage = 50 (probably a load of rubbish since I guessed this up)
- Fill up the spectators crowbar slot with something similar to weapon_zm_holstered that just does nothing
As I said, I don’t have very much knowledge with Lua and I’m not desperate for a fix since I can just remove them until I have one or figure out a way myself so please don’t abuse me if I’ve said something blatantly stupid to a coder. Anyhow, I’m grateful for any sort of support and I congratulate anyone who has read to the end of this.