I use SSM Safewriting 291.
How do i disable TAC Tank damage towards infantries?
❤️ 0
function BlockTACDamage(hit)
hit.damage = ((hit.target and hit.shooter and hit.target ~= hit.shooter and not hit.target.actor:GetLinkedVehicleId() and hit.type == "tac") and 0 or hit.damage);
end;
SafeWriting.FuncContainer:AddFunc(BlockTACDamage,"ProcessActorDamage");
--------------------------------
And about the invulerability after leaving vehicle.. I didn't manage to find that Script in SFW, but maybe it can be disabled in the config file?
_InvulnerabilityWhenLeaveVehicle = false; -- set to true if you WANT Invulnerability after leaving vehicle
g_gameRules.OnLeaveVehicleSeat=function(self,vehicle, seat, entityId, exiting)
MakePluginEvent("OnLeaveVehicleSeat",vehicle,seat,entityId,exiting);
if (self.isServer and self:GetState()=="InGame") then
if (exiting) then
local empty=true;
for i,seat in pairs(vehicle.Seats) do
local passengerId = seat:GetPassengerId();
if (passengerId and passengerId~=NULL_ENTITY and passengerId~=entityId) then
empty=false;
break;
end
end
if (empty) then
vehicle.lastOwnerId=entityId;
local player=System.GetEntity(entityId);
if (player) then
player.lastVehicleId=vehicle.id;
end
end
if(entityId==vehicle.vehicle:GetOwnerId()) then
vehicle.vehicle:SetOwnerId(NULL_ENTITY);
end
if vehicle.class=="US_vtol" or vehicle.class=="Asian_helicopter" and _InvulnerabilityWhenLeaveVehicle then
g_gameRules.game:SetInvulnerability(entityId,true,(vehicle.vehicle:GetMovementType()=="air" and 2 or 1));
end
end
end
end
------------------------------
Hope this helped you! :D
SafeWriting.FuncContainer:AddFunc(BlockTACDamage,"ProcessActorDamage");
with
SafeWriting.FuncContainer:AddFunc(BlockTACDamage,"OnHit");