Python1320

Untitled

Jul 18th, 2010
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local ItemStack = {}
  2.  
  3. function items.PushEntity( class )
  4.     if( ITEM != nil ) then
  5.         table.insert( ItemStack, 1, { Table = ITEM, Class = class:lower() } )
  6.     end
  7.    
  8.     ITEM = {}
  9.     table.Merge( ITEM, items.EntityBase )
  10.     ITEM_CLASS = class:lower()
  11.     ITEM.ClassName = class:lower()
  12. end
  13.  
  14. function items.PopEntity()
  15.     ITEM = nil
  16.     ITEM_CLASS = nil
  17.     if( #ItemStack > 0 ) then
  18.         ITEM = ItemStack[1].Table
  19.         ITEM_CLASS = ItemStack[1].Class
  20.         table.remove( ItemStack, 1 )
  21.     end
  22. end
Add Comment
Please, Sign In to add comment