public void HandlePlayerLootCarLift(BasePlayer player, ModularCarGarage carLift)
            {
                var car = carLift?.carOccupant;

                if (car == null)
                {
                    return;
                }

                if (LootersOfCar.ContainsKey(car))
                {
                    LootersOfCar[car].Add(player);
                }
                else
                {
                    LootersOfCar.Add(car, new List <BasePlayer> {
                        player
                    });
                }

                if (LootingCar.ContainsKey(player))
                {
                    LootingCar[player] = car;
                }
                else
                {
                    LootingCar.Add(player, car);
                }
            }
 object CanLootEntity(BasePlayer player, ModularCarGarage carLift)
 {
     if (PluginConfig.AllowEditingWhileLockedOut || !carLift.PlatformIsOccupied)
     {
         return(null);
     }
     return(CanPlayerInteractWithCar(player, carLift.carOccupant));
 }
        void OnLootEntity(BasePlayer player, ModularCarGarage carLift)
        {
            LiftTracker.HandlePlayerLootCarLift(player, carLift);

            var car = carLift?.carOccupant;

            if (car == null)
            {
                return;
            }
            UIManager.UpdateCarUI(car);
        }
Пример #4
0
        object CanLootEntity(BasePlayer player, ModularCarGarage carLift)
        {
            if (!carLift.PlatformIsOccupied)
            {
                return(null);
            }

            var car = carLift.carOccupant;

            if (car != null && IsBombTruck(car))
            {
                ChatMessage(player, "Lift.Edit.Error");
                return(false);
            }

            return(null);
        }