Graz 1 Posted January 8, 2013 I'm trying to add a vehicle spawning function into an RPG server. I've got 2 items and a script Laptop, with an addaction to run "spawnlada.sqf" A create called BYbox I was hoping to begin with a condition for the box that checks that the required items are put into. Is there any way to count items as a condition? Something like: //Spawnlada.sqf //prevent tampering BYbox setVehicleLock "LOCKED"; //This is where I get stuck //Define arrays _wheels = //command to count inventory?// "itemWheel" //create BYbox _haveitems? //Does BYbox have "itemEngine" && ( _wheel > 4) //This is where I get stuck if _haveitems = 1 then { BYbox Removemagazine "itemEngine"; BYbox Removemagazine "itemWheel"; BYbox Removemagazine "itemWheel"; BYbox Removemagazine "itemWheel"; BYbox Removemagazine "itemWheel"; [ ] exec "makelada.sqs"; } //open for business! BYbox setVehicleLock "UNLOCKED"; I've been on this for a few hours, does anyone know of any solutions? Share this post Link to post Share on other sites
lifted86 10 Posted January 8, 2013 you can use some BIS functions to mess with inventory, you can find a few here Share this post Link to post Share on other sites
Graz 1 Posted January 8, 2013 Wow thanks, so I can use _Boneyardinventory = [bYbox] call BIS_fnc_invString; What's the best way to check the array for the item? There's no query commands coming to mind! Share this post Link to post Share on other sites
lifted86 10 Posted January 8, 2013 yep. use the in command like "ItemGPS" in [_this] call BIS_fnc_invString will return true or false. Share this post Link to post Share on other sites