09.10.2018, 12:11
Quote:
So uh, something like this?
PHP код:
|
Create a variable before the loop to keep track if all of them are 1:
Код:
new bool:all_true = true; for(new i=0; i<10; i++) { if(PlayerInfo[id][Inv][i] != 1) // One of them is not 1, so set the variable to false { all_true = false; break; // Since we know that at least one is not true, we don't need to continue checking... Stop the loop } } if(all_true) // All indexes are 1 { // Code }