Main config

config.lua is the Configuration file of the script

-- =========================================
-- Config.lua
-- =========================================
Config = {}

-- =========================================
-- General Settings
-- =========================================
-- These settings control the basic setup of the script.
Config.Framework = 'auto' -- Choose how the script detects your server framework. Options: 'esx', 'qbcore', 'qbx', or 'auto' (automatically detects the framework).
Config.TargetSystem = "ox_target" -- Choose the targeting system for interactions. Options: "qb-target" or "ox_target".
Config.InventorySystem = 'ox_inventory' -- Change this to 'qb-inventory' to switch
Config.StudentIDItem = 'student_id' -- The name of the item in your inventory that represents a student ID card.
Config.debug = false -- Turn on debug mode to see extra logs for troubleshooting. Set to 'true' if you’re testing; otherwise, keep it 'false'.

-- =========================================
-- School Features
-- =========================================
-- These settings are for school-related features like registration.
Config.DirectorMenu = vector3(-1656.5, 193.2, 61.65) -- The in-game location (coordinates) where students can register for school. You can find coordinates using a tool or mod.

-- Interaction zone configuration
Config.InteractionZone = {
    size = vec3(0.25, 0.25, 0.25)           -- Size of interaction zone
}

-- =========================================
-- Map and Blip Settings
-- =========================================
-- These settings add a marker (blip) on the map for the university.
Config.UniversityBlip = {
    {
        coords = vec3(-1652.97, 172.24, 64.33), -- The exact spot on the map where the blip appears.
        sprite = 419,       -- The icon type for the blip (419 is a default icon; you can look up others online).
        color = 0,          -- The color of the blip (0 is white; check online for other color codes).
        scale = 0.9,        -- The size of the blip on the map (0.9 is slightly smaller than default).
        name = "University",-- The name shown when players hover over the blip.
        shortRange = true   -- If 'true', the blip only shows when players are nearby.
    }
}

-- =========================================
-- Inventory and Item Settings
-- =========================================
-- These settings control rules for backpacks and lockers.
Config.OneBagInInventory = true -- If 'true', players can only carry one backpack at a time in their inventory.

-- Backpack Storage Capacity
Config.BackpackStorage = {
    slots = 8,      -- How many different items the backpack can hold (number of slots).
    weight = 10000  -- How much total weight the backpack can carry (in grams; adjust based on your server’s weight system).
}

-- Locker Storage Capacity
Config.Locker = {
    label = "Metal School Locker", -- The name shown when players interact with the locker.
    slots = 10,                    -- How many different items the locker can hold.
    weight = 5000                  -- How much total weight the locker can carry (in grams).
}

-- =========================================
-- Shop Configurations
-- =========================================
-- These settings define shops where players can buy items.
Config.Shops = {
    school_armory = {
        id = "school_armory",        -- A unique name for this shop (don’t change unless needed).
        label = "School Armory",     -- The name players see for this shop.
        coords = vec3(-1638.1, 180.4, 66.8),  -- Added: Required for qb-inventory; matches your client zone
        items = {                    -- List of items available for purchase in this shop.
            { name = 'printer_paper', price = 1, count = 10 }, -- Item name, price, and how many are in stock.
            { name = 'bandage', price = 4, count = 10 },  
            { name = 'chalkboard2', price = 4, count = 10 }
        }
    },
    university_backpack_shop = {
        id = 'university_backpack_shop', -- Unique name for this shop.
        label = 'University Shop', -- Name players see.
        type = 'shop',               -- Type of interaction (keep as 'shop').
        coords = vec3(0.0, 0.0, 0.0),  -- Added: Replace with actual coords if you have a zone for this shop
        items = {
            { name = 'backpack', price = 500, slots = 10, restock = 3600 } -- Item name, price, slots it provides, and restock time (in seconds).
        }
    },
    chemistry_shop = {  -- Added: Chemistry Shop configuration
        id = "chemistry_shop",       -- Unique name for this shop.
        label = "Chemistry Shop",    -- The name players see for this shop.
        type = 'shop',               -- Type of interaction (keep as 'shop').
        coords = vec3(-1655.7, 158.15, 70.75),  -- Added: Required for qb-inventory; matches your client zone
        items = {                    -- List of items available for purchase in this shop (free and infinite stock).
            { name = 'acetone', price = 20, slots = 10, restock = 3600 },  -- Item name, price (0 for free), and stock (math.huge for infinite).
            { name = 'acid', price = 23, slots = 10, restock = 3600 },      -- Add more items here if needed.
        }
    },
    -- Snippet for config.lua: Add this to your existing Config.Shops table
    paper_shop = {  -- Add this entry
    id = "paper_shop",
    label = "Paper Shop",
    type = 'shop',
    coords = vec3(-1651.4, 154.01, 70.7),  -- Matches client coords (for qb-inventory)
    items = {
        { name = 'printer_paper', price = 1, count = 10 },  -- Example item; adjust as needed
        -- Add more paper-related items here, e.g., { name = 'notebook', price = 5, count = 20 }
    }
}
}
-- Shop Vendor (Ped) Configurations
-- These settings add NPCs (peds) that players can interact with to access shops.
Config.ShopPeds = {
    backpack_vendor = {
        coords = vec3(-1639.41, 173.08, 61.76),      -- Where the NPC spawns in the game world (coordinates).
        model = `a_m_y_business_02`,                 -- The NPC’s appearance (a business casual male; search online for other models).
        heading = 102.98,                             -- The direction the NPC faces (in degrees; 180 is south).
        animation = "WORLD_HUMAN_STAND_IMPATIENT",   -- The animation the NPC plays (standing impatiently).
        shopId = 'university_backpack_shop',         -- Links this NPC to the shop defined above.
        interaction = {
            name = "open_backpack_shop",             -- A unique name for this interaction (don’t change unless needed).
            icon = "fa-solid fa-shop",               -- The icon shown for the interaction (a shop icon).
            label = "Open University Shop",            -- The text players see when they can interact with the NPC.
            distance = 2.5                           -- How close players need to be to interact (in meters).
        }
    }
    -- You can add more vendors by uncommenting (removing the '--') and editing the example below:
    -- cafe_vendor = {
    --     coords = vec3(-1570.0, 230.0, 60.14),      -- Different location for this NPC.
    --     model = `a_f_y_business_01`,               -- A female business NPC.
    --     heading = 90.0,                            -- Faces east (90 degrees).
    --     animation = "WORLD_HUMAN_CLIPBOARD",       -- Holding a clipboard animation.
    --     shopId = 'university_cafe',                -- Links to a different shop (must be defined in Config.Shops).
    --     interaction = {
    --         name = "open_cafe_shop",               -- Unique interaction name.
    --         icon = "fa-solid fa-coffee",           -- Coffee icon for the interaction.
    --         label = "Open University Cafe",        -- Text players see.
    --         distance = 2.5                         -- Interaction distance.
    --     }
    -- }
}

-- =========================================
-- School Bell Settings
-- =========================================
-- These settings control the school bell feature.
Config.Bell = {
    Job = "school",                     -- The job role required to ring the bell (e.g., teachers or staff).
    JobGrade = 2,                       -- The minimum job level/grade needed to ring the bell.
    Location = vec3(-1655.4, 182.4, 61.9), -- Where the bell is located for interaction (coordinates).
    InteractionDistance = 0.7,          -- How close players need to be to ring the bell (in meters).
    Cooldown = 60,                      -- How long players must wait before ringing the bell again (in seconds).
    NotificationRadius = 150.0,         -- How far the bell notification reaches other players (in meters).
    Sound = {
        name = "doorbell",              -- The name of the sound (used by the sound system).
        url = "https://cfx-nui-xsound/html/sounds/bell.ogg", -- The web link to the bell sound file.
        volume = 0.5,                   -- How loud the sound is (0.0 is silent, 1.0 is max).
        maxVolume = 0.9,                -- The loudest the sound can get.
        range = 60.0                    -- How far away players can hear the bell (in meters).
    },
    Animation = {
        dict = "mini@repair",           -- The animation category for ringing the bell.
        anim = "fixing_a_ped",          -- The specific animation played.
        duration = 3000                 -- How long the animation lasts (in milliseconds; 3000 = 3 seconds).
    }
}

-- Bell Notification Settings
-- These control the messages players see when interacting with the bell.
Config.Notifications = {
    success = {
        title = "School Bell",          -- The title of the notification.
        description = "You have successfully rung the bell!", -- The message shown.
        type = "success",               -- The style of notification (green for success).
        icon = "fa-solid fa-bell",      -- The icon shown (a bell).
        position = "top",               -- Where the notification appears on the screen.
        duration = 3000                 -- How long the notification stays (in milliseconds; 3000 = 3 seconds).
    },
    cooldown = {
        title = "Cooldown",
        description = "Please wait before ringing the bell again.",
        type = "error",                 -- Red notification for errors.
        icon = "fa-solid fa-bell",
        position = "top",
        duration = 3000
    },
    noPermission = {
        title = "School Bell",
        description = "You do not have permission to ring the bell.",
        type = "error",
        icon = "fa-solid fa-bell",
        position = "top",
        duration = 3000
    }
}

-- =========================================
-- UI and Interaction Settings
-- =========================================
-- These settings control how interactions and text appear on the screen.
Config.textuiPos = 'right-center' -- Where text prompts appear on the screen (options: 'left-center', 'right-center', etc.).
Config.sitsGetUpKey = 38          -- The key players press to stand up from sitting (38 is the 'E' key; check online for other key codes).

-- =========================================
-- Notification Messages
-- =========================================
-- These are the messages shown to players for specific actions or errors.
Strings = {
    action_incomplete = 'Action Incomplete',              -- Shown when an action can’t be completed.
    one_backpack_only = 'You can only have 1x backpack!', -- Shown when a player tries to carry more than one backpack.
    backpack_in_backpack = 'You can\'t place a backpack within another!' -- Shown when a player tries to put a backpack inside another backpack.
}

Last updated