Guest User

Untitled

a guest
Oct 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. function PLUGIN:GiveItem( ply, args )
  2. self:Give( ply, args[1], args[2] )
  3. end
  4.  
  5. function PLUGIN:Give( ply, id, num )
  6. if num == nil then local num = 1 end
  7. ply:GetInventory():AddItem(tonumber(id), tonumber(num))
  8. end
  9.  
  10. function PLUGIN:Take( ply, id )
  11. ply:GetInventory():RemoveItem( tonumber(id) )
  12. end
  13.  
  14. function PLUGIN:Clear( ply )
  15. ply:GetInventory():Clear()
  16. end
  17.  
  18. function PLUGIN:Check( ply, id )
  19. local check = ply:GetInventory():HasItem( tonumber(id) )
  20. return check
  21. end
Add Comment
Please, Sign In to add comment