15.10.2016, 17:35
Do something like this:
PHP код:
new count;
for(new i = 0; i < 10; i ++)
{
if(pItems[playerid][iID][i] > 0 && pItems[playerid][iUsed][i] == 0)
{
count ++;
format(string, sizeof(string), "%s[%i]\t%s\t[%i]\n", string, count, NObject(pItems[playerid][iType][i]), pItems[playerid][iAmmo][i]);
}
}
for(new i = count; i < 10; i ++)
{
format(string, sizeof(string), "%s[%i]\tEmpty space\n", string, i);
}