Advertisement
Guest User

aaa

a guest
Dec 22nd, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. local list = minetest.env:get_objects_in_radius(pos, radius);
  2. local count = #list;
  3. local MAX_ENTS = 10;
  4.  
  5. if (count > MAX_ENTS) then
  6.     for i = (MAX_ENTS + 1), count do
  7.         if (list[i]:get_name() == "peaceful_npc:npc") then
  8.             list[i]:remove();
  9.         end
  10.     end
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement