04.08.2011, 11:51
I made a for loop that will get the first key that has the value of 0 but for some reason it takes all the keys that have a value of 0.
Here it is:
ForLoop is just for(new i=0;i<MAX_OWNED;i++)
MAX_OWNED is 3
Here it is:
PHP код:
ForLoop(i,MAX_OWNED) if(HKey[playerid][i] == 0) HKey[playerid][i] = HouseInfo[h][hKey], printf("House key: %i | House slot: %i",HKey[playerid][i],i);
MAX_OWNED is 3