hey amigo,
im working on a similar problem to open a gate when spawned vehicles enter a triggers area. I have this code in a script to check if the unit is a vehicle:
_unit = _this Select 0
? vehicle _unit != DRIVER _unit: goto "inveh"
If the _unit being tested is a vehicle, then the above test should be true (vehicle will not equal driver). IF the _unit being tested is a human on foot, then vehicle and driver will both return the same unit (and the above condition is false).
plus this might also be useful:
? vehicle _unit != _unit
Is the code to check if the unit is in a vehicle or not. If a unit is not in a vehicle then
? vehicle _unit == _unit
will return TRUE.
check out the entire thread if you need more info on how to use these commands:
http://www.ofpec.com/forum/index.php?topic=28690.0another thing im aware of is that the Explosion FX version 1.02 BETA script by MadDogX has some code in it to detect the exact type of vehicle if you need to be sure the vehicle is a supply truck.