Jump to content
Sign in to follow this  
colinm9991

Check for available gear slots

Recommended Posts

I can't seem to find a command on the wiki for this; how would I check a units backpack, vest or uniform for available gear slots and compare it to the likes of a hat?

Quick example of explanation: I have an action that will remove a hat from a player, I want the code to check if there is available space to place this hat in the uniform, if not then it checks the vest, if not then it checks and places it in the backpack. Or vice-versa; Which ever one has the storage space to store the hat; it will put it in that whether it be a Uniform, Vest or Backpack.

--Update--

I'm testing with the canAddTo functions; will see if they work.

--Update--

Solved with canAddItemToBackpack, canAddItemToVest & canAddItemToUniform.

Edited by ColinM9991
Solved

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×