Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function FGod( ply, dmginfo )
- if(ply:GetNetworkedVar("FGod") == 1) then
- dmginfo:ScaleDamage( 0 )
- end
- end
- hook.Add("EntityTakeDamage", "FGod", FGod)
- hook.Add("PhysgunDrop", "ply_physgunfreeze", function(pl, ent)
- hook.Remove( "PhysgunDrop", "ulxPlayerDrop" )
- ent._physgunned = false
- if( ent:IsPlayer() && ( pl:IsUserGroup( "superadmin" ) or pl:IsUserGroup( "YourSecondAdminGroupHere" )) ) then --Mark add the admin groups here, just add insert this again "or pl:IsUserGroup( "YetAnotherGroup" )"
- if(pl:KeyDown(IN_ATTACK2)) then
- ent:Freeze(true)
- ent:SetNetworkedVar("FGod", 1)
- else
- ent:Freeze(false)
- ent:SetNetworkedVar("FGod", 0)
- ent:SetMoveType(MOVETYPE_WALK)
- end
- if SERVER then
- if !ent:Alive() then
- ent:Spawn()
- self:PlayerSpawn(ent)
- ent:SetPos(pl:GetEyeTrace().HitPos)
- end
- end
- else
- ent:Freeze(false)
- ent:SetNetworkedVar("FGod", 0)
- ent:SetMoveType(MOVETYPE_WALK)
- return
- end
- end)
- hook.Add( "PhysgunPickup", "ply_physgunned", function(pl, ent)
- ent._physgunned = true
- end)
- function playerDies( pl, weapon, killer )
- if(pl._physgunned) then
- return false
- else
- return true
- end
- end
- hook.Add( "CanPlayerSuicide", "playerNoDeath", playerDies )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement