Sikkunt Aaron Posted April 29, 2016 Share Posted April 29, 2016 so guys, hit us up,how would my script so that, if my inventory is not full (<28 items) i do an action, although when my inv is full i do a different action i know this is autism at it's finest but my sad attempts didn't work Quote Link to comment Share on other sites More sharing options...
Vilius Posted April 29, 2016 Share Posted April 29, 2016 if(!getInventory().isFull()){ //inventory not full <28 }else{ //inventory is full >28 } Or you coule check outgetInventory().isFull() getInventory().isEmpty() .isEmpty will only work when there is no items in the inventory. So you are better of doing !getInventory().isFull() because that will let you do stuff while the inventory is not full and it can still contain items without saying it is full, because you need 28 items for it to be full :p 1 Quote Link to comment Share on other sites More sharing options...
FrostBug Posted April 29, 2016 Share Posted April 29, 2016 inventory is full >28 Hax 2 Quote Link to comment Share on other sites More sharing options...
Qubit Posted May 1, 2016 Share Posted May 1, 2016 you should probably learn some more programming logic before scripting.. Makes everything a bit easier Quote Link to comment Share on other sites More sharing options...
Strange_Fk Posted May 1, 2016 Share Posted May 1, 2016 if(inventory.isFull()) { //action you want it to do } if(!inventory.isFull()) { //action you want it to do } the "!" in front of booleans (conditions) basically means the opposite return than if it didn't have it. if else statements work well too, but I would stick to using just if statements for now, but thats just my opinion Quote Link to comment Share on other sites More sharing options...