Hi,
use onClientPlayerDamage event, check if players animation is this one when he is under the vehicle (couldn't find it quickly, sorry). If so - cancelEvent().
^This will also cancel being beaten by another player if you are on the ground.
There is damage_causing parameter given by onClientPlayerDamage event. Check if here for its id, then cancel the event.