Exemple #1
0
 /// <summary>
 /// Обработчик подмены документов
 /// </summary>
 private void FinishFalsification(Client player, object[] args)
 {
     PlayActionAnimation(player);
     player.resetSyncedData(IN_REPOSITORY);
     player.resetData(REPOSITORY_KEY);
     player.resetData(IN_REPOSITORY);
     SetQuestReward(player);
     ActionHelper.SetAction(3000, () => {
         PlayerInfoManager.SetPlayerClothes(player, true);
         _inventoryManager.EquipWeapon(player);
     });
     API.triggerClientEvent(player, ServerEvent.HIDE_CLAN_QUEST_POINTS);
 }
        /// <summary>
        /// Получить зарплату
        /// </summary>
        private void GetSalary(Client player, object[] args)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            if (!WorkIsCorrect(player, activeWork, () => activeWork.Type == WorkType.Wrecker))
            {
                return;
            }
            WorkInfoManager.SetActivity(player, WorkType.Wrecker, false);
            player.resetData(WorkData.IS_WRECKER);
            PayOut(player, activeWork);
            PlayerInfoManager.SetPlayerClothes(player);
            API.triggerClientEvent(player, ServerEvent.HIDE_PARKING_FINE_MENU);
        }
        /// <summary>
        /// Завершить работу и получить зарплату
        /// </summary>
        private void GetSalary(Client player, object[] objects)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            if (!WorkIsCorrect(player, activeWork, () => activeWork.Type == WorkType.TaxiDriver))
            {
                return;
            }
            WorkInfoManager.SetActivity(player, WorkType.TaxiDriver, false);
            player.setData(WorkData.IS_TAXI_DIVER, null);
            PlayerInfoManager.SetPlayerClothes(player);
            PayOut(player, activeWork);
            API.triggerClientEvent(player, ServerEvent.HIDE_SIEMON_MENU);
        }
Exemple #4
0
        /// <summary>
        /// Получение зарплаты дальнобойщика
        /// </summary>
        private void TruckerSalary(Client player, object[] args)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            if (!WorkIsCorrect(player, activeWork, () => activeWork.Type == WorkType.Trucker))
            {
                return;
            }
            WorkInfoManager.SetActivity(player, WorkType.Trucker, false);
            player.resetSyncedData(WorkData.IS_TRUCKER);
            player.resetData(WorkData.DELIVERY_CONTRACT);
            PayOut(player, activeWork);
            PlayerInfoManager.SetPlayerClothes(player);
            API.triggerClientEvent(player, ServerEvent.HIDE_TRUCKERS_MENU);
        }
        /// <summary>
        /// Получить зарплату
        /// </summary>
        private void GetSalary(Client player, object[] objects)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            if (!WorkIsCorrect(player, activeWork, () => activeWork.Type == WorkType.BusDriver))
            {
                return;
            }
            WorkInfoManager.SetActivity(player, WorkType.BusDriver, false);
            DecreaseRouteDriversCount(player);
            player.resetData(WorkData.IS_BUS_DRIVER);
            player.resetData(BusDriverManager.SHAPE_KEY);
            player.resetData(BusDriverManager.ROUTE_KEY);
            PlayerInfoManager.SetPlayerClothes(player);
            PayOut(player, activeWork);
            API.triggerClientEvent(player, ServerEvent.HIDE_ONEIL_MENU);
        }
        /// <summary>
        /// Получить зарплату
        /// </summary>
        private void GetSalary(Client player, object[] args)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            if (!WorkIsCorrect(player, activeWork, () => activeWork.Type == WorkType.Police))
            {
                return;
            }
            WorkInfoManager.SetActivity(player, WorkType.Police, false);
            player.resetData(WorkData.IS_POLICEMAN);
            player.resetSyncedData("HasPoliceActions");
            PayOut(player, activeWork);
            PlayerInfoManager.SetPlayerClothes(player);
            PlayerManager.SetPlayerName(player, PlayerInfoManager.GetInfo(player));
            _inventoryManager.EquipWeapon(player);
            _policeAlertManager.HideAllAlerts(player);
            API.triggerClientEvent(player, ServerEvent.HIDE_SARAH_MENU);
        }
Exemple #7
0
        /// <summary>
        /// Получение зарплаты
        /// </summary>
        private void GetSalary(Client player, object[] args)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            bool TypeChecker() => activeWork.Type == WorkType.Builder;

            if (!WorkIsCorrect(player, activeWork, TypeChecker))
            {
                return;
            }
            WorkInfoManager.SetActivity(player, activeWork.Type, false);
            player.resetData(BuilderManager.BUILDER_POINT_KEY);
            player.resetSyncedData(WorkData.IS_BUILDER);
            PlayerInfoManager.SetPlayerClothes(player);
            PayOut(player, activeWork);
            API.triggerClientEvent(player, ServerEvent.HIDE_BUILDER_POINT);
            API.triggerClientEvent(player, ServerEvent.HIDE_BUILDER_MENU);
        }
        /// <summary>
        /// Получение зарплаты
        /// </summary>
        private void GetSalary(Client player, object[] args)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            bool TypeChecker() => activeWork.Type == WorkType.Fisherman;

            if (!WorkIsCorrect(player, activeWork, TypeChecker))
            {
                return;
            }
            WorkInfoManager.SetActivity(player, activeWork.Type, false);
            player.resetData(FishermanManager.FISHERMAN_POINT_KEY);
            player.resetSyncedData(WorkData.IS_FISHERMAN);
            player.resetSyncedData(WorkData.IS_FISHERMAN_ON_BOAT);
            PlayerInfoManager.SetPlayerClothes(player);
            PayOut(player, activeWork);
            API.triggerClientEvent(player, ServerEvent.HIDE_FISHERMAN_POINT);
            API.triggerClientEvent(player, ServerEvent.HIDE_FISHERMAN_MENU);
        }
Exemple #9
0
        /// <summary>
        /// Получить зарплату
        /// </summary>
        private void GetSalary(Client player, object[] objects)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            bool TypeChecker() => activeWork.Type == WorkType.Forklift;

            if (!WorkIsCorrect(player, activeWork, TypeChecker))
            {
                return;
            }
            WorkInfoManager.SetActivity(player, activeWork.Type, false);
            API.resetEntityData(player, WorkData.IS_FORKLIFT);
            player.resetData(ForkliftManager.FORKLIFT_TAKE_KEY);
            player.resetData(ForkliftManager.FORKLIFT_PUT_KEY);
            PlayerInfoManager.SetPlayerClothes(player);
            PayOut(player, activeWork);
            API.triggerClientEvent(player, ServerEvent.HIDE_LOADER_POINTS);
            API.triggerClientEvent(player, ServerEvent.HIDE_FORKLIFT_MENU);
        }
        /// <summary>
        /// Получить зарплату
        /// </summary>
        private void GetSalary(Client player, object[] args)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            bool TypeChecker() => activeWork.Type == WorkType.Loader;

            if (!WorkIsCorrect(player, activeWork, TypeChecker))
            {
                return;
            }
            LoaderEventHandler.PutThing(player);
            WorkInfoManager.SetActivity(player, activeWork.Type, false);
            player.resetData(WorkData.IS_LOADER);
            player.resetData(LoaderManager.LOADER_TAKE_KEY);
            player.resetData(LoaderManager.LOADER_PUT_KEY);
            PlayerInfoManager.SetPlayerClothes(player);
            PayOut(player, activeWork);
            API.triggerClientEvent(player, ServerEvent.HIDE_LOADER_POINTS);
            API.triggerClientEvent(player, ServerEvent.HIDE_LOADER_MENU);
        }
Exemple #11
0
        /// <summary>
        /// Получение зарплаты
        /// </summary>
        private void BistroSalary(Client player, object[] args)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            bool TypeCheker() => activeWork.Type == WorkType.FoodTrunk || activeWork.Type == WorkType.FoodDeliveryMan;

            if (!WorkIsCorrect(player, activeWork, TypeCheker))
            {
                return;
            }
            WorkInfoManager.SetActivity(player, activeWork.Type, false);
            player.resetData(WorkData.IS_FOOD_TRUCK_DRIVER);
            player.resetData(WorkData.IS_FOOD_DELIVERYMAN);
            player.resetSyncedData(BistroManager.POINT_NUMBER_KEY);
            API.setPlayerClothes(player, 5, 0, 0); // снимаем сумку
            PlayerInfoManager.SetPlayerClothes(player);
            PayOut(player, activeWork);
            API.triggerClientEvent(player, ServerEvent.STOP_TIMER);
            API.triggerClientEvent(player, ServerEvent.HIDE_BISTRO_MENU);
        }
Exemple #12
0
        /// <summary>
        /// Получить зарплату
        /// </summary>
        private void GetSalary(Client player, object[] args)
        {
            var activeWork = WorkInfoManager.GetActiveWork(player);

            bool TypeChecker() => activeWork.Type == WorkType.Farmer || activeWork.Type == WorkType.TractorDriver;

            if (!WorkIsCorrect(player, activeWork, TypeChecker))
            {
                return;
            }
            FarmerManager.PutHarvest(player);
            WorkInfoManager.SetActivity(player, activeWork.Type, false);
            player.resetData(WorkData.IS_FARMER);
            player.resetData(WorkData.IS_TRACTOR_DRIVER);
            player.resetData(FarmerManager.FARMER_POINT_KEY);
            player.resetData(TractorDriverManager.TRACTOR_POINT_KEY);
            PlayerInfoManager.SetPlayerClothes(player);
            PayOut(player, activeWork);
            API.triggerClientEvent(player, ServerEvent.HIDE_FARMER_POINT);
            API.triggerClientEvent(player, ServerEvent.HIDE_FARMER_END_POINT);
            API.triggerClientEvent(player, ServerEvent.HIDE_FARM_MENU);
        }