mirror of
https://github.com/CFC-Servers/cfc_spawn_protection.git
synced 2025-03-04 03:13:14 -05:00
Disable spawnprotection on physgun activities
This commit is contained in:
parent
b721f7444a
commit
fcaed3bd68
@ -245,6 +245,25 @@ hook.Add( "PlayerEnteredVehicle", "CFCremoveSpawnProtectionOnEnterVehicle", func
|
||||
instantRemoveSpawnProtection( ply, "You've entered a vehicle and lost spawn protection." )
|
||||
end )
|
||||
|
||||
-- Physgun activity
|
||||
hook.Add( "OnPhysgunPickup", "CFCremoveSpawnProtectionOnPhysgunPickup", function( ply )
|
||||
if not playerHasSpawnProtection( ply ) then return end
|
||||
|
||||
instantRemoveSpawnProtection( ply, "You've picked up a prop and lost spawn protection." )
|
||||
end )
|
||||
|
||||
hook.Add( "OnPhysgunReload", "CFCremoveSpawnProtectionOnPhysgunReload", function( ply )
|
||||
if not playerHasSpawnProtection( ply ) then return end
|
||||
|
||||
instantRemoveSpawnProtection( ply, "You unfroze props and lost spawn protection." )
|
||||
end )
|
||||
|
||||
hook.Add( "OnPhysgunFreeze", "CFCremoveSpawnProtectionOnPhysgunFreeze", function( ply )
|
||||
if not playerHasSpawnProtection( ply ) then return end
|
||||
|
||||
instantRemoveSpawnProtection( ply, "You unfroze a prop and lost spawn protection." )
|
||||
end )
|
||||
|
||||
-- Enable spawn protection when spawning in PvP
|
||||
hook.Add( "PlayerSpawn", "CFCsetSpawnProtection", setSpawnProtectionForPvpSpawn )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user