diff options
| -rw-r--r-- | gamemode/shared/weaponswap.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gamemode/shared/weaponswap.lua b/gamemode/shared/weaponswap.lua index aa82d53..81e21e5 100644 --- a/gamemode/shared/weaponswap.lua +++ b/gamemode/shared/weaponswap.lua @@ -84,7 +84,8 @@ if (CLIENT) then if (!IsValid(wep)) then return end
- if (pl.Weapons and pl.Weapons[pl.Select]) then wep:SetWeaponHoldType(pl.Weapons[pl.Select].Item.HoldType)
+ if (pl.Weapons and pl.Weapons[pl.Select] and pl.Weapons[pl.Select].Item and pl.Weapons[pl.Select].Item.HoldType) then
+ wep:SetWeaponHoldType(pl.Weapons[pl.Select].Item.HoldType)
else wep:SetWeaponHoldType("normal") end
end)
|
