08.12.2018, 16:41
Hello there, I am facing a simple problem but I do not know how to solve it, I have this sequence with decision commands, I wanted it even if the first if it returned a true value, it continues for the others, but it does not continue in the game if the first one value is true, it does not do others, someone knows why?
PHP код:
if(itemtype[1] == item_EnfeCruze)
{
if(count == 3)
return 0;
SendClientMessage(playerid, RED, "DEPURADO SLOT1");
RemoveItemFromInventory(playerid, 0);
DestroyItem(itemid[1]);
count = count + 1;
}
else if(itemtype[2] == item_EnfeCruze)
{
if(count == 3)
return 0;
SendClientMessage(playerid, RED, "DEPURADO SLOT2");
RemoveItemFromInventory(playerid, 1);
DestroyItem(itemid[2]);
count = count + 1;
}
else if(itemtype[3] == item_EnfeCruze)
{
if(count == 3)
return 0;
SendClientMessage(playerid, RED, "DEPURADO SLOT3");
RemoveItemFromInventory(playerid, 2);
DestroyItem(itemid[3]);
count = count + 1;
}
else if(itemtype[4] == item_EnfeCruze)
{
if(count == 3)
return 0;
SendClientMessage(playerid, RED, "DEPURADO SLOT4");
RemoveItemFromInventory(playerid, 3);
DestroyItem(itemid[4]);
count = count + 1;
}
else if(itemtype[5] == item_EnfeCruze)
{
if(count == 3)
return 0;
SendClientMessage(playerid, RED, "DEPURADO SLOT5");
RemoveItemFromInventory(playerid, 4);
DestroyItem(itemid[5]);
count = count + 1;
}
else if(itemtype[6] == item_EnfeCruze)
{
if(count == 3)
return 0;
SendClientMessage(playerid, RED, "DEPURADO SLOT6");
RemoveItemFromInventory(playerid, 5);
DestroyItem(itemid[6]);
count = count + 1;
}
else if(itemtype[7] == item_EnfeCruze)
{
if(count == 3)
return 0;
SendClientMessage(playerid, RED, "DEPURADO SLOT7");
RemoveItemFromInventory(playerid, 6);
DestroyItem(itemid[7]);
count = count + 1;
}
else if(itemtype[8] == item_EnfeCruze)
{
if(count == 3)
return 0;
SendClientMessage(playerid, RED, "DEPURADO SLOT8");
RemoveItemFromInventory(playerid, 7);
DestroyItem(itemid[8]);
count = count + 1;
}
else if(itemtype[9] == item_EnfeCruze)
{
if(count == 3)
return 0;
SendClientMessage(playerid, RED, "DEPURADO SLOT9");
RemoveItemFromInventory(playerid, 8);
DestroyItem(itemid[9]);
count = count + 1;
}
else if(itemtype[10] == item_EnfeCruze)
{
if(count == 3)
return 0;
SendClientMessage(playerid, RED, "DEPURADO SLOT10");
RemoveItemFromInventory(playerid, 9);
DestroyItem(itemid[10]);
count = count + 1;
}
else
{
SendClientMessage(playerid, RED, "[ > ] Vocк nгo tem itens suficientes.");
}