示例#1
0
        public void OnClientEvent(Client client, string eventName, params object[] arguments)
        {
            switch (eventName)
            {
            case "ClothingShop_Buy":
                ClothingShopService.BuyClothing(client, (string)arguments[0], (int)arguments[1]);
                break;

            case "ClothingShop_Preview":
                ClothingShopService.PreviewClothing(client, (string)arguments[0], (int)arguments[1]);
                break;

            case "ClothingShop_Close":
                ClothingShopService.ResetPreview(client);
                break;

            case "KeyboardKey_E_Pressed":
                if (client.isInVehicle)
                {
                    return;
                }
                ClothingShopService.OpenShopMenu(client);
                break;
            }
        }
示例#2
0
        public void AddClothingShopItem(Client client, int clothingShopId, string type, int id)
        {
            ClothingShop clothingShop = ClothingShopService.ClothingShopList.FirstOrDefault(x => x.Id == clothingShopId);
            Clothing     clothing;

            if (clothingShop == null)
            {
                return;
            }
            switch (type)
            {
            case "top":
                clothing = ClothingService.TopList.FirstOrDefault(x => x.Id == id);
                if (clothing == null)
                {
                    return;
                }
                if (clothingShop.AvailableTops.FirstOrDefault(x => x.Id == id) != null)
                {
                    return;
                }
                clothingShop.AvailableTops.Add(clothing);
                API.sendChatMessageToPlayer(client, "Top ID: " + id + " added to Shop " + clothingShopId);
                break;

            case "leg":
                clothing = ClothingService.LegList.FirstOrDefault(x => x.Id == id);
                if (clothing == null)
                {
                    return;
                }
                if (clothingShop.AvailableLegs.FirstOrDefault(x => x.Id == id) != null)
                {
                    return;
                }
                clothingShop.AvailableLegs.Add(clothing);
                API.sendChatMessageToPlayer(client, "Leg ID: " + id + " added to Shop " + clothingShopId);
                break;

            case "feet":
                clothing = ClothingService.FeetList.FirstOrDefault(x => x.Id == id);
                if (clothing == null)
                {
                    return;
                }
                if (clothingShop.AvailableFeets.FirstOrDefault(x => x.Id == id) != null)
                {
                    return;
                }
                clothingShop.AvailableFeets.Add(clothing);
                API.sendChatMessageToPlayer(client, "Feet ID: " + id + " added to Shop " + clothingShopId);
                break;
            }
            ClothingShopService.SaveClothingShop(clothingShopId);
        }
        public void LoadAllMySQLInformations()
        {
            ATMService.LoadAllATMs();
            BlipService.LoadCustomBlipsFromDatabase();
            ClothingService.LoadAllClothing();
            ItemService.LoadItemsFromDB();
            ShopService.LoadShopsFromDB();
            GarageService.LoadAllGarageFromDB();
            VehicleService.ResetAllVehicles();
            GasStationService.LoadAllGasStationsFromDB();
            VehicleService.LoadVehicleInformationsFromDB();
            VehicleShopService.LoadAllVehicleShopsFromDB();
            DoorService.LoadAllDoorsFromDB();
            ClothingShopService.LoadAllClothingShopsFromDB();

            API.delay(3000, true, () =>
            {
                API.setServerPassword(oldServerPassword);
                API.consoleOutput("Server is now unlocked..");
            });
        }
示例#4
0
 public void AddClothingShopPed(Client client, int clothingShopId)
 {
     ClothingShopService.ChangePedPosition(clothingShopId, client.position, client.rotation.Z);
 }
示例#5
0
 public void AddClothingShop(Client client)
 {
     ClothingShopService.AddClothingShop(client.position);
 }