Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function vRP.hasInventoryItem(user_id, idname)
- local count = vRP.getInventoryItemAmount(user_id, idname)
- return count > 0
- end
- -- get user inventory amount of item
- function vRP.getInventoryItemAmount(user_id,idname)
- local data = vRP.getUserDataTable(user_id)
- if data and data.inventory then
- local entry = data.inventory[idname]
- if entry then
- return entry.amount
- end
- end
- return 0
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement