Python1320

Untitled

Nov 25th, 2010
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local oldpos=ply:GetPos()
  2.  
  3. ply:SetPos(ply:GetEyeTrace().HitPos)
  4. for _,actrl in pairs(actrls) do
  5.     if !actrl:Canwhose( ply , 0 ) then
  6.         ply:SetPos(oldpos)
  7.         nero.ChatMessage("Goto", [[Blocked by ]]..tostring(actrl:Getwhose():IsValid() and actrl:Getwhose():Name() or "unknown").."'s area controller!", ply)
  8.         return
  9.     end
  10. end
  11.  
  12. ---------------------------------- why is it not like this:
  13.  
  14. for _,actrl in pairs(actrls) do
  15.     if !actrl:Canwhose( ply , 0 ) then
  16.         nero.ChatMessage("Goto", [[Blocked by ]]..tostring(actrl:Getwhose():IsValid() and actrl:Getwhose():Name() or "unknown").."'s area controller!", ply)
  17.         return
  18.     end
  19. end
  20. ply:SetPos(ply:GetEyeTrace().HitPos)
Add Comment
Please, Sign In to add comment