コード例 #1
0
 public static void OnVehicleDamage(this PlayerModel player, VehicleModel vehicle)
 {
     try { if (player == null)
           {
               return;
           }
           WeaponSync.OnVehicleDamage(player, vehicle, player.CurrentWeapon); }
     catch (Exception ex) { Core.Debug.CatchExceptions(ex); }
 }
コード例 #2
0
 public static void WeaponDamage(PlayerModel player, PlayerModel target, uint weapon, ushort dmg, Position offset, BodyPart bodypart)
 {
     try { if (!Functions.AnticheatModel.AntiGodmode)
           {
               return;
           }
           WeaponSync.WeaponDamage(player, target, weapon, dmg, offset, bodypart); Alt.Emit("GlobalSystems:OnEntityHit", player, target); }
     catch { }
 }
コード例 #3
0
 public static void WeaponDamage(PlayerModel player, PlayerModel target, uint weapon, ushort dmg, Position offset, BodyPart bodypart)
 {
     try { if (target == null)
           {
               return;
           }
           if (!Functions.AnticheatModel.AntiGodmode)
           {
               return;
           }
           WeaponSync.WeaponDamage(player, target, weapon, dmg, offset, bodypart); Alt.Emit("GlobalSystems:OnEntityHit", player, target); }
     catch (Exception ex) { Core.Debug.CatchExceptions("WeaponDamage", ex); }
 }
コード例 #4
0
 public static void WeaponDamage(PlayerModel player, IEntity entity, uint weapon, ushort dmg, Position offset, BodyPart bodypart)
 {
     try
     {
         if (!Functions.AnticheatModel.AntiGodmode)
         {
             return;
         }
         if (entity is null || !entity.Exists)
         {
             return;
         }
         if (entity is PlayerModel target)
         {
             WeaponSync.WeaponDamage(player, target, weapon, dmg, offset, bodypart);
         }
         else if (entity is VehicleModel vehicle)
         {
             WeaponSync.OnVehicleDamage(player, vehicle, weapon);
         }
     }
     catch (Exception ex) { Core.Debug.CatchExceptions(ex); }
 }