Maris Posted August 1, 2015 Share Posted August 1, 2015 There is no "inventory" component on client side. So how to check is there specific item or not?Thanks in advance. Link to comment Share on other sites More sharing options...
Kzisor Posted August 1, 2015 Share Posted August 1, 2015 @Maris, inventory_replica or simply send a request to the server and bounce back the result. Link to comment Share on other sites More sharing options...
Maris Posted August 1, 2015 Author Share Posted August 1, 2015 @Kzisor, but client already have this information because it is showing inventory with items. Why to send a request? Link to comment Share on other sites More sharing options...
Kzisor Posted August 1, 2015 Share Posted August 1, 2015 @Maris, I gave two options, if you choose to ignore the first option the only way to do it is to request the information from the server and bounce it back to the client. The reason I gave both options is because sometimes not all the information is sent to the client even those it's "displaying" the item. Link to comment Share on other sites More sharing options...
DarkXero Posted August 1, 2015 Share Posted August 1, 2015 if inst.replica.inventory then local has, number = inst.replica.inventory:Has("prefab", "amount") if has then print("There are "..number.." of prefabs") endendYou can also get the itemslots table with GetItems(),an item from a slot with GetItemInSlot(slot),and check for tags in equipment with EquipHasTag(tag). Link to comment Share on other sites More sharing options...
Maris Posted August 2, 2015 Author Share Posted August 2, 2015 You're geniuses. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now