15.05.2014, 20:31
Quote:
That is incorrect. If the first vehicle doesn't match, it will return the error without even checking the rest of the array. Never return inside a loop unless you explicitly want to break it.
|
pawn Code:
new i;
for (i = 0; i < sizeof(RandomRegularVehicle); i++)
if(CarInfo[idx][cModel] == RandomRegularVehicle[i][0]) break;
if (i == sizeof(RandomRegularVehicle))
return SendClientMessage(playerid, COLOR_RED, "You cannot sell this type of vehicle here");