The cab lights can be powered in two ways:
1. The lights are connected to vehicle's Batt(+) and the cab door switch(es) provide the lights with Batt(-) to turn them ON, or
2. The lights are connected to vehicle's ground, which is Batt(-), and the cab door switch(es) provide the lights with Batt(+), respectively.
Either way, you can use the vehicle's ignition switch in a manner to provide the buzzer with power only when the ignition is ON.
Assuming that the ignition switch is turned ON just before the engine is started, it can be used to provide the buzzer with Batt(+) in the first case, above, with the Buzzer(-) connected to the cab door switch(es) to get Batt(-) when the doors are open. In the second case, the Ign(+) line can be inverted using a simple NPN transistor inverter to provide the buzzer with Batt(-) when the ignition switch is ON, while the buzzer will take Batt(+) directly from the cab door switch(es) when the doors are open.
This way, the buzzer will be on only when the cab doors are open AND the ignition switch is on.
-George