05.11.2016, 11:32
GetVehicleModel returns 0 when the vehicle does not exist. You can prevent it in GetVehicleName but shouldn't this function be called at all in the first place for invalid vehicles.
pawn Код:
GetVehicleName(vehicleid)
{
new vstring[18], modelid = GetVehicleModel(vehicleid);
if (modelid) strcat(vstring, vehicleNames[modelid - 400]);
return vstring;
}