Пример #1
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);
        }
Пример #3
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);
        }
Пример #5
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);
        }
Пример #6
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);
        }