Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. -----[[----------------------
  2. -- Minge-Freeze
  3. -- By
  4. -- Rainbow
  5. -- Hybrid Networks
  6. -- 2017
  7. -- MIT License is in effect 2017.
  8. -- Please read Valve ToS and Steam ToS for licensing.
  9. -- If you wish to edit this script please seek permission first.
  10. -- -- Hybrid Gaming Network 2017.
  11. ----------------]]-----------
  12.  
  13. function FGod( ply, dmginfo )
  14. if(ply:GetNWInt("FGod") == 1) then
  15. dmginfo:ScaleDamage( 0 )
  16. end
  17. end
  18. hook.Add("EntityTakeDamage", "FGod", FGod)
  19.  
  20. hook.Add("PhysgunDrop", "ply_physgunfreeze", function(pl, ent)
  21. hook.Remove( "PhysgunDrop", "ulxPlayerDrop" )
  22. hook.Remove( "PhysgunDrop", "FAdmin_PickUpPlayers" )
  23.  
  24. ent._physgunned = false
  25.  
  26. if( ent:IsPlayer() )then
  27. ent:SetMoveType(pl:KeyDown(IN_ATTACK2) and MOVETYPE_NOCLIP or MOVETYPE_WALK)
  28.  
  29. if(pl:KeyDown(IN_ATTACK2)) then
  30. ent:Freeze(true)
  31. ent:SetNWInt("FGod", 1)
  32. if !timer.Exists("freeze"..ent:SteamID()) then
  33. print(pl:Name().."<"..pl:SteamID().."> has frozen "..ent:Name().."<"..ent:SteamID()..">")
  34. timer.Create( "freeze"..ent:SteamID(), 1, 1, function() end )
  35. end
  36. elseif ent:GetNWInt("FGod") == 1 then
  37. ent:Freeze(false)
  38. ent:SetNWInt("FGod", 0)
  39. if !timer.Exists("unfreeze"..ent:SteamID()) then
  40. print(pl:Name().."<"..pl:SteamID().."> has un-frozen "..ent:Name().."<"..ent:SteamID()..">")
  41. timer.Create( "unfreeze"..ent:SteamID(), 1, 1, function() end )
  42. end
  43. end
  44.  
  45. if SERVER then
  46.  
  47. if !ent:Alive() then
  48. ent:Spawn()
  49. self:PlayerSpawn(ent)
  50. ent:SetPos(pl:GetEyeTrace().HitPos)
  51. end
  52. end
  53.  
  54. return --self.BaseClass:PhysgunDrop( pl , ent )
  55. end
  56. end)
  57.  
  58. hook.Add( "PhysgunPickup", "ply_physgunned", function(pl, ent)
  59. ent._physgunned = true
  60. end)
  61.  
  62. function playerDies( pl, weapon, killer )
  63. return pl:GetNWInt("FGod") == 0
  64. end
  65. hook.Add( "CanPlayerSuicide", "playerNoDeath", playerDies )
  66.  
  67. hook.Add("PlayerSwitchWeapon","Teststst",function(ply)
  68. return ply:GetNWInt("FGod") == 1
  69. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement