18.06.2015, 16:43
Checking if the car is valid prevents it and also change the 2nd dimension of the array to 18 as it's nowhere close to 64.
EDIT: In the loop, you can skip it directly so it won't call the function for no reason:
PHP код:
GetVehicleModelName(modelid)
{
new tmp_vname[sizeof VehicleName[]];
if (400 <= modelid <= 611) strcat(tmp_vname, VehicleName[modelid - 400], sizeof tmp_vname);
return tmp_vname;
}
pawn Код:
if (!(400 <= g_VehicleData[i][eModel] <= 611)) continue;