Controlling vehicle damage

Hey everyone,
I am trying to port a gamemode/server I had a couple of years ago on MTA:SA to FiveM. Before fully committing to it tho, I am trying simple stuff that I know I will need in the future, since FiveM does not offer quite as much “commodities” one may take for granted in MTA:SA.

Currently I am trying to control player/vehicle damage. So far I can successfully control damage between players using relationship groups, and also managed to circumvent the issue where hated groups would not sit in a vehicle together.
Right now I am trying to do the same but for player-vehicle damage, but I cannot manage to fully control it. The best I could achieve was with the CEventNetworkEntityDamage event, but even that is not perfect, since cancelling it seems to do nothing, and I do not have access to the exact damage that was dealt, so I cannot perfectly restore the entity health, so I resorted to getting the weapon “base” damage. The problem is, when there is something that is fatal to the vehicle, like a rocket or grenade, that solution is useless, because the vehicle ends up exploding. I have tried cancelling the explosionEvent on the server, but besides being very tricky to do properly, it does not prevent the explosion on the client that originated it, so it is a no go.

I know it is possible, because with SetEntityCanBeDamaged set to false, rockets do nothing to the vehicle, like I intend, but it blocks damage from all players. Naturally, I tried SetEntityCanBeDamagedByRelationshipGroup, but this native seems to do absolutely nothing. Am I mising something, or does this native not work at all? I have looked for its usages and found very little information about it.

Really hope someone can give me a hand!

Thanks.