Quote:
Originally Posted by Vince
Put this somewhere:
PHP код:
stock in_array(needle, const haystack[], size = sizeof haystack, &index = 0)
{
for(new i; i < size; i++)
{
if(haystack[i] == needle)
{
index = i;
return true;
}
}
return false;
}
Then:
PHP код:
if(in_array(vehicleid, g_Vehicle) && PlayerInfo[playerid][TaxiDuty] == 0)
|
Can you explain Why we use index = i in the loop?