Python1320

Untitled

Sep 23rd, 2010
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local me = nero.GetPlayer("CapsAdmin")
  2. local max1 = me:GetRunSpeed()
  3. local max2 = me:GetWalkSpeed()
  4.  
  5. hook.Add("Think", "SlowDown!", function()
  6.     for key, ply in pairs(ents.FindInSphere(me:GetPos(), 4000)) do
  7.         if ply:IsPlayer() and ply ~= me then
  8.             ply:SetRunSpeed(math.Clamp(ply:GetPos():Distance(me:GetPos())/2, 0, max1))
  9.             ply:SetWalkSpeed(math.Clamp(ply:GetPos():Distance(me:GetPos())/2, 0, max2))
  10.         end
  11.     end
  12. end)
Advertisement
Add Comment
Please, Sign In to add comment