16.01.2015, 15:04
Hello There, My Question is Why Do we Use Loops In a Code? For Example This Code:
So, If now you must have read the Above Code.. So Some Explanation please?
Well... I'm Confused In This thing
Here Why Do we Have put [i] After [iSlot]..
These are My Questions...
pawn Код:
stock ShowInventory(playerid)
{
new iteminv[20];//20 item 0->19
for(new i = 0; i < 20;i++)// Get all form 0 to 19
{
iteminv[i] = InvInfo[playerid][iSlot][i];// Check item in slot
if(InvInfo[playerid][iSlot][i] == 0) // if slot i no have item . it will return model '!'
{
iteminv[i] = 1239;// 1239 is model '!'
}
}
ShowModelSelectionMenuEx(playerid, iteminv,20, "Inventory",INVENTORY_MENU, 0.0, 0.0,0.0);//mSelection
return 1;
}
Well... I'm Confused In This thing
pawn Код:
{
iteminv[i] = InvInfo[playerid][iSlot][i];// Check item in slot
if(InvInfo[playerid][iSlot][i] == 0) // if slot i no have item . it will return model '!'
{
These are My Questions...