Sjoerdva97

Untitled

Jan 24th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. function debugging()
  2.     for a, b in pairs(indexedPools) do
  3.         if a == "object" then
  4.             outputChatBox(tostring(indexedPools["object"][5])) -- this returns the object
  5.             for i,v in ipairs(b) do
  6.                 outputChatBox(getElementData(v, "id"))
  7.             end
  8.            
  9.         end
  10.     end
  11. end
  12. addCommandHandler("debugpool", debugging)  
  13.  
  14. function getElement(elementType, id)
  15.     outputChatBox(indexedPools["object"][5]) -- this returns a nil value
  16.     return indexedPools[elementType] and indexedPools[elementType][tonumber(id)]
  17. end
Advertisement
Add Comment
Please, Sign In to add comment