mirror of
https://github.com/CFC-Servers/cfc_spawn_protection.git
synced 2025-03-04 03:13:14 -05:00
Merge pull request #40 from CFC-Servers/fix/null-weapon-error
Fix NULL weapon error
This commit is contained in:
commit
76c435dd7d
@ -211,7 +211,8 @@ local function spawnProtectionKeyPressCheck( ply, keyCode )
|
||||
return
|
||||
end
|
||||
|
||||
if attackKeys[keyCode] and not weaponIsAllowed( ply:GetActiveWeapon() ) then
|
||||
local plyActiveWeapon = ply:GetActiveWeapon()
|
||||
if attackKeys[keyCode] and plyActiveWeapon:IsValid() and not weaponIsAllowed( plyActiveWeapon ) then
|
||||
instantRemoveSpawnProtection( ply, "You've attacked and lost spawn protection." )
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user