11.02.2009, 20:06
yes you do 
for optimalisation I'd use
the "return 1;" bit stops it from looping the entire array if a match has been found, you can also use "break", if you have code underneath the loop

for optimalisation I'd use
Код:
if(PlayerToPoint(2.0, playerid, 2505.359,-1694.991,12.682) || PlayerToPoint(2.0, playerid, 2016.005,-2408.939,12.676) || PlayerToPoint(2.0, playerid, 2008.825,-2409.354,12.676) || PlayerToPoint(2.0, playerid, -1703.099,409.712,6.309))
{
for (new i = 0; i < sizeof(AllowedCarModels); i++)
if (model == AllowedCarModels[i])
{
ShowMenuForPlayer(TuningMenu, playerid);
TogglePlayerControllable(playerid,0);
return 1;
}
}

