🛠️Config

TZMCCatCafeConfig = {}

--[[

    INSTALLATION

    If you're having issues please contact hello@tzmc.dev and we can help out. 

    -- QB INVENTORY LABELS (THIS IS ONLY APPLICABLE IF YOU'RE USING LEGACY QBCORE) --

    1. Navigate to ..[qb]\qb-inventory\server\main.lua
    2. Navigate to around line 632 just below the if statement "if other then"
    3. Underneath that if statement, paste the following text

        if other.label == nil then
            secondInv.label = "Stash-"..id
        else
            secondInv.label = other.label
        end
    
    4. Once pasted, delete the duplicate "secondInv.name = "stash-"..id" that is underneath the if statement you just pasted. 
    5. You're done, it should look like this. https://ibb.co/31pXjWL

    -- nh-context --

    This script requires nh-context which you can install here: https://github.com/nighmares/nh-context

    -- QB ITEMS --

    1.  Navigate to .../[qb]/qb-core/shared/items.lua
    2.  Scroll to the bottom of the item list and paste the following text - https://pastebin.com/UgtC2Kng
    3.  Once added, navigate to .../[qb]/qb-inventory/html/images/ - Paste the following pictures into the images folder https://drive.google.com/file/d/1YuR5sLYmcZFKFaGTQnjv5yvFmMCCmHEp/view?usp=sharing
    4.  You are now done.

    -- ADD ITEMS TO CONSUMABLE QB --
        
    If you're using legacy QBCore, skip to step 3 :) 

    1.  Navigate to .../[qb]/qb-smallresources/server/consumables.lua
    2.  Paste the following text underneath line 1 - https://pastebin.com/tydePwLF
    3.  Once added, head over to .../[qb]/qb-smallresources/config.lua 
    4.  Within the 'Consumables' section, paste the following text at the bottom of the table.

            ["chocolatechipcookie"] = math.random(40, 50),
            ["chocolatecupcake"] = math.random(25, 35),
            ["pancakes"] = math.random(40, 50),
            ["scrambledeggs"] = math.random(60, 70),

    5.  Within the 'ConsumeablesDrink' section, paste the following text at the bottom of the table.

            ["espresso"] = math.random(40, 50),
            ["latte"] = math.random(40, 50),

        These just set a random value to increase the hunger or thirst amount for each item. You can set these to whatever you'd like if you would like certain items to quench thirst quicker. 
        
    6.  You are now done

    -- ADD JOB TO QB --

    1. Navigate to ..[qb]/qb-core/shared/jobs.lua
    2. Head to the bottom of the file and add the following text - https://pastebin.com/LMRZCSZr - It should look like this https://ibb.co/PjWS2qB.
    3. Once added, navigate to ...[qb]/qb-phone/server/main.lua
    4. Navigate to QBCore.Commands.Add('bill'... around line 1065
    5. Replace the first if statement condition with the following text - ... or biller.PlayerData.job.name == 'catcafe' - It should look like this https://ibb.co/RQHHYH8

]]

-- QBCore --

TZMCCatCafeConfig.UsingLegacyQBCore = false -- If you're using an older version of QB core, giving items is slightly different. However, if you are on a recent version feel free to leave this false.

-- MENU ITEMS --

TZMCCatCafeConfig.OvenItems = {
    { 
        name = "Chocolate Chip Cookie",
        context = "Flour, Sugar, Chocolate, Butter",
        itemName = "chocolatechipcookie",
        disabled = false,
        image = "https://i.ibb.co/nLKX1yR/choco-cookie.png",
        itemsRequired = {
            ["flour"] = 1,
            ["sugar"] = 1,
            ["chocolate"] = 1,
            ["butter"] = 1,
        },
    },
    { 
        name = "Chocolate Cupcake",
        context = "Flour, Sugar, Chocolate, Eggs, Butter",
        itemName = "chocolatecupcake",
        disabled = false,
        image = "https://i.ibb.co/g6jm3yM/choco-cupcake.png",
        itemsRequired = {
            ["flour"] = 1,
            ["sugar"] = 1,
            ["chocolate"] = 1,
            ["eggs"] = 1,
            ["butter"] = 1,
        },
    }
}

TZMCCatCafeConfig.HobItems = {
    { 
        name = "Pancakes",
        context = "Flour, Eggs, Milk, Butter",
        itemName = "pancakes",
        disabled = false,
        image = "https://i.ibb.co/4t0LjQy/pancakes.png",
        itemsRequired = {
            ["flour"] = 1,
            ["eggs"] = 1,
            ["milk"] = 1,
            ["butter"] = 1,
        },
    },
    { 
        name = "Scrambled Eggs",
        context = "Eggs, Milk, Butter",
        itemName = "scrambledeggs",
        disabled = false,
        image = "https://i.ibb.co/VYZK7Kc/scrambled-eggs.png",
        itemsRequired = {
            ["eggs"] = 2,
            ["milk"] = 1,
            ["butter"] = 1,
        },
    }
}

TZMCCatCafeConfig.CoffeeMachineItems = {
    { 
        name = "Espresso",
        context = "Coffee Beans, Water",
        itemName = "espresso",
        disabled = false,
        image = "https://i.ibb.co/Xb7R62w/espresso.png",
        itemsRequired = {
            ["coffeebeans"] = 1,
            ["water_bottle"] = 1,
            ["coffeecup"] = 1
        },
    },
    { 
        name = "Latte",
        context = "Coffee Beans, Milk",
        itemName = "latte",
        disabled = false,
        image = "https://i.ibb.co/GW5J0sj/latte.png",
        itemsRequired = {
            ["coffeebeans"] = 1,
            ["milk"] = 1,
            ["coffeecup"] = 1
        },
    }
}

-- STASH CONFIG --

TZMCCatCafeConfig.ItemCollectionStashName = "Counter"
TZMCCatCafeConfig.ItemCollectionStashConfig = {
    weight = 5000,
    slots = 5
}

TZMCCatCafeConfig.TableStashName = "Table"
TZMCCatCafeConfig.TableStashConfig = {
    weight = 5000,
    slots = 5
}

TZMCCatCafeConfig.LargeStorageShelfName = "Large Storage Shelf"
TZMCCatCafeConfig.LargeStorageShelfConfig = {
    weight = 500000,
    slots = 50
}

TZMCCatCafeConfig.FridgeStashName = "Fridge Shelf"
TZMCCatCafeConfig.FridgeStashConfig = {
    weight = 25000,
    slots = 25
}

TZMCCatCafeConfig.FoodPassName = "Food Pass"
TZMCCatCafeConfig.FoodPassConfig = {
    weight = 25000,
    slots = 25
}

-- PROGRESS BAR --

TZMCCatCafeConfig.MakingDrink = "Making Drink"
TZMCCatCafeConfig.DrinkProgressBarTime = 7

TZMCCatCafeConfig.Cooking = "Cooking"
TZMCCatCafeConfig.CookingTime = 7


-- TARGET --

TZMCCatCafeConfig.OpenText = "Open"
TZMCCatCafeConfig.CollectCupText = "Collect Cup"
TZMCCatCafeConfig.CoffeeMachineText = "Make a Drink"
TZMCCatCafeConfig.HobText = "Cook"
TZMCCatCafeConfig.OvenText = "Cook"
TZMCCatCafeConfig.BossLoginText = "Login"
TZMCCatCafeConfig.LockerText = "Change Outfit"
TZMCCatCafeConfig.OnOffDutyText = "On/Off Duty"

TZMCCatCafeConfig.CounterIcon = "fa-solid fa-cookie-bite"
TZMCCatCafeConfig.CupIcon = "fa-solid fa-mug-hot"
TZMCCatCafeConfig.CoffeeMachineIcon = "fa-solid fa-mug-saucer"
TZMCCatCafeConfig.HobIcon = "fa-solid fa-fire-burner"
TZMCCatCafeConfig.OvenIcon = "fa-solid fa-temperature-high"
TZMCCatCafeConfig.BossLoginIcon = "fa-solid fa-briefcase"
TZMCCatCafeConfig.LockerIcon = "fa-solid fa-shirt"
TZMCCatCafeConfig.OnOffDutyIcon = "fa-solid fa-clipboard"


-- NOTIFICATIONS --

TZMCCatCafeConfig.UseQBNotify = true
TZMCCatCafeConfig.NotificationEvent = "" -- If you're using your own notification system, enter the event here. If you leave this blank and set QBNotify to false this will use the FiveM chat to notify the player. The parameters are (text, status) Status can be either 'success' or 'error'.

TZMCCatCafeConfig.SuccessTitle = 'Success'
TZMCCatCafeConfig.ErrorTitle = 'Error'
TZMCCatCafeConfig.NoItems = "Seems that you don't have enough items to craft this."

Last updated