Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PLUGIN:GiveItem( ply, args )
- self:Give( ply, args[1], args[2] )
- end
- function PLUGIN:Give( ply, id, num )
- if num == nil then local num = 1 end
- ply:GetInventory():AddItem(tonumber(id), tonumber(num))
- end
- function PLUGIN:Take( ply, id )
- ply:GetInventory():RemoveItem( tonumber(id) )
- end
- function PLUGIN:Clear( ply )
- ply:GetInventory():Clear()
- end
- function PLUGIN:Check( ply, id )
- local check = ply:GetInventory():HasItem( tonumber(id) )
- return check
- end
Add Comment
Please, Sign In to add comment