コード例 #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, 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); }
 }