26.10.2013, 14:45
That's kind of mine convention, because there isn't a name conflict (Iterator returns something like CarInfo@YSII_Cg, CarInfo@YSII_Ag), and it's easier to remember only one label 
The OnVehicleDeath is special case for vehicles with -1 respawn delay. I'm a little worried about note in wiki and the callback called when vehicle submerges. No idea how to handle that case.
Your last point is valid. There is also additional important thing to remember - vehicles start at 1, not 0, so either we have to create a macro to overwrite array access from CarInfo[vehicleid] to CarInfo[(vehicleid - 1)] (then MAX_VEHICLES is sufficient, and the cell @0 isn't wasted), or add on script init Iter_Add(CarInfo, 0).

The OnVehicleDeath is special case for vehicles with -1 respawn delay. I'm a little worried about note in wiki and the callback called when vehicle submerges. No idea how to handle that case.
Your last point is valid. There is also additional important thing to remember - vehicles start at 1, not 0, so either we have to create a macro to overwrite array access from CarInfo[vehicleid] to CarInfo[(vehicleid - 1)] (then MAX_VEHICLES is sufficient, and the cell @0 isn't wasted), or add on script init Iter_Add(CarInfo, 0).