Stopping Carla from getting inside vehicles she shouldn't:
You can see if Carla is inside a vehicle by the simple command:
?vehicle Carla !=Carla : hint "Carla's in a vehicle!"
(this is due to the fact that "vehicle unit" will always return the unit itself unless having boarded a vehicle)
After having come to the conclusion she's in a vehicle, you can, I guess, figure out what kind of vehicle it is and whether or not she's allowed to drive around in it by a number of different ways, but there are caveats of course: for instance when Carla is NOT the player, you should still be able to transport her in various trucks, APCs and possibly even tanks without her being ejected. How about something like this:
?canFire (vehicle Carla) && (gunner vehicle Carla) == Carla OR canFire (vehicle Carla) && (commander vehicle Carla) == Carla OR canfire (vehicle Carla) && (driver vehicle Carla) == Carla : Carla unassignVehicle vehicle Carla; Carla action ["Eject", vehicle Carla]; Carla say "I_Refuse_To_Drive_This"
Basically, the script first checks if the vehicle Carla is in "canFire" (has offensive capabilities), and if that is the case it boots her out and possibly gives a message. Should work, no?
Wolfrug out.