23.05.2015, 14:12
Why did you use foreach? It should be a for loop and use the size of VehicleNamesEx array.
By the way, why do you use VehicleNames and VehicleNamesEx arrays? One would be fine unless you have different vehicle names.
pawn Код:
GetVehicleIDFromNameEx(vehiclename[])
{
for (new i; i != sizeof (VehicleNamesEx); ++i)
{
if(strfind(VehicleNamesEx[i], vehiclename, false) != -1) return i + 400;
}
return -1;
}