Supplies System

Elevate your RedM gameplay with [Codex]: Supplies, a dynamic script designed to enhance the economic simulation of your towns. This innovative system integrates town supplies into shops, creating a realistic and engaging experience for players.

Key Features:

:white_check_mark: Dynamic Supply System :

Each town relies on a carefully managed supply system. If a town runs low on supplies, its shops—including both NPC vendors and player-operated businesses—are unable to sell goods, resulting in a significant power loss for the town.

:white_check_mark: Presidential Control :

The only way to replenish supplies is through the town president. This role can be designated to each town’s president or a single president overseeing multiple towns. This central authority adds an intriguing layer of strategy and responsibility to the gameplay.

:white_check_mark: Realistic Economic Impact

Experience the thrill of managing town resources. The balance between supply and demand affects the overall vitality of the town, encouraging players to engage in trade and community management.

:white_check_mark: Seamless Integration

Designed for easy integration with existing gameplay mechanics, [Codex]: Supplies enhances your server’s functionality without compromising performance.

Config File :

Config = {

    --========================= Key Configuration =========================
    Keys = {
        -- Letter Keys
        ["A"] = 0x7065027D, ["B"] = 0x4CC0E2FE, ["C"] = 0x9959A6F0, ["D"] = 0xB4E465B4,
        ["E"] = 0xCEFD9220, ["F"] = 0xB2F377E8, ["G"] = 0x760A9C6F, ["H"] = 0x24978A28,
        ["I"] = 0xC1989F95, ["J"] = 0xF3830D8E, ["K"] = nil, ["L"] = 0x80F28E95,
        ["M"] = 0xE31C6A41, ["N"] = 0x4BC9DABB, ["O"] = 0xF1301666, ["P"] = 0xD82E0BD2,
        ["Q"] = 0xDE794E3E, ["R"] = 0xE30CD707, ["S"] = 0xD27782E3, ["T"] = nil,
        ["U"] = 0xD8F73058, ["V"] = 0x7F8D09B8, ["W"] = 0x8FD015D8, ["X"] = 0x8CC9CD42,
        ["Y"] = nil, ["Z"] = 0x26E9DC00,

        -- Symbol Keys
        ["RIGHTBRACKET"] = 0xA5BDCD3C, ["LEFTBRACKET"] = 0x430593AA,

        -- Mouse Buttons
        ["MOUSE1"] = 0x07CE1E61, ["MOUSE2"] = 0xF84FA74F, ["MOUSE3"] = 0xCEE12B50, ["MWUP"] = 0x3076E97C,

        -- Modifier Keys
        ["CTRL"] = 0xDB096B85, ["TAB"] = 0xB238FE0B, ["SHIFT"] = 0x8FFC75D6, ["SPACEBAR"] = 0xD9D0E1C0,
        ["ENTER"] = 0xC7B5340A, ["BACKSPACE"] = 0x156F7119, ["LALT"] = 0x8AAA0AD4, ["DEL"] = 0x4AF4D473,
        ["PGUP"] = 0x446258B6, ["PGDN"] = 0x3C3DD371,

        -- Function Keys
        ["F1"] = 0xA8E3F467, ["F4"] = 0x1F6D95E5, ["F6"] = 0x3C0A40F2,

        -- Number Keys
        ["1"] = 0xE6F612E4, ["2"] = 0x1CE6D9EB, ["3"] = 0x4F49CC4C, ["4"] = 0x8F9F9E58,
        ["5"] = 0xAB62E997, ["6"] = 0xA1FDE2A6, ["7"] = 0xB03A913B, ["8"] = 0x42385422,

        -- Arrow Keys
        ["DOWN"] = 0x05CA7C52, ["UP"] = 0x6319DB71, ["LEFT"] = 0xA65EBAB4, ["RIGHT"] = 0xDEB34313,
    },


    --========================= Global Configuration Settings =========================
    -- Database connection configuration. Choose the SQL resource your server uses.
    SQLResource = "ghmattimysql",  -- Options: "ghmattimysql", "mysql-async", "oxmysql" (Recommended: "ghmattimysql") 💾

    -- Whether or not to respond with errors when there is an issue with SQL operations
    SQL_RespondError = 0,  -- Set to 1 to show SQL error responses, set to 0 to disable error display

    -- Enable/Disable developer mode (for debugging and development purposes)
    DeveloperMode = true,  -- Set to true if the server is in development mode ⚙️

    -- Framework type your server is using
    FrameWork = "VORP",  -- Specify the framework for your server (e.g., "VORP" or others) 🛠️

    -- Menu configuration (change based on the menu system you are using)
    MenuData = "menu_base",  -- Options: "menu_base", "rsg-menubase", "menuapi" 📋

    -- Blip for NPCs (used on the map to display NPC locations)
    BlipSpriteIcon_npcs = 819673798,  -- Icon for NPC blips on the map 📍

    -- Whether resupplies are enabled for the game (this can be toggled on or off)
    ReSupplier = true,  -- Set to true to enable resupplies 💼

    -- Item name for resupplying (the item used to resupply the town)
    ResupplierItem = "resupply_wood",  -- Item used to resupply (e.g., "resupply_wood") 🌲

    -- NPC model for the resupply NPC
    ResupplyNPC_Model = "amsp_robsdgunsmith_males_01",  -- NPC model used for resupply missions 🤖

    -- Interaction button (the key that players must press to interact with the resupply mission)
    InteractionButton = "G",  -- Set to "G" for the 'G' key interaction 🤝

    -- NPC heading direction (the starting heading for the NPC at spawn)
    NPCHeading = 319.46,  -- The direction in which the NPC faces upon spawning 🔄

    -- Resupply multiplier (used to scale the resupply amounts)
    ResupplyMultiplyer = 1,  -- Multiplier for the resupply amount (default is 1) 📊

    -- Minimum check for resupply (used to determine the minimum amount of supplies before resupplying)
    ResupplyMinimumCheck = 25,  -- Minimum number of supplies required before resupplying 🧮

    -- Maximum interaction distance (how close the player needs to be to interact with the resupply NPC)
    MaxInteractDistance = 3,  -- Maximum distance for NPC interaction (default is 3 meters) 📏

    -- Resupply amount for a single interaction
    ResupplySingle = 1,  -- Amount of supplies given per interaction (default is 1) 🎁

    -- Amount of supplies removed per purchase
    RemoveSuppliesPerBuy = 1,  -- Number of supplies removed per purchase (default is 1) 🛒

    -- Disable headshot feature (if set to true, headshots will be disabled)
    DisableHeadshot = true,  -- Set to true to disable headshots 🔫

    -- Job roles for town presidents (specific jobs that are allowed to manage the supplies)
    PresidentsJobs = {
        "valentinepresi", "vanhornpresi", "tambleweedpresi", "strawberrypresi", 
        "sdpresi", "rhodespresi", "blackwaterpresi", "armadilopresi", "annessburgpresi",
    },

    -- Text that appears in 3D when interacting with the NPC
    Text3D = "Press [G] to Manage Supplies",  -- Prompt for players when near the resupply NPC 📲

    -- Resupply position coordinates (where the resupply NPCs are located across the map)
    ResupplyPos = {
        ["Coords"] = {
            -- Position 1: Annesburg
            [1] = {x = 2976.52, y = 1429.84, z = 44.62 , allowedjob = "annessburgpresi"},
            -- Position 2: Saint Denis
            [2] = {x = 2630.94, y = -1489.62, z = 45.87, allowedjob = "sdpresi"},
            -- Position 3: Rhodes
            [3] = {x = 1431.56, y = -1371.45, z = 81.65, allowedjob = "rhodespresi"},
            -- Position 4: Blackwater
            [4] = {x = -754.4, y = -1354.31, z = 43.41, allowedjob = "blackwaterpresi"},
            -- Position 5: Strawberry
            [5] = {x = -1833.77, y = -440.53, z = 159.72, allowedjob = "strawberrypresi"},
            -- Position 6: Armadillo
            [6] = {x = -3647.02, y =  -2602.21, z = -13.06, allowedjob = "armadilopresi"},
            -- Position 7: Tumbleweed
            [7] = {x = -5499.3, y = -2339.61, z = 0.45, allowedjob = "tambleweedpresi"},
            -- Position 8: Valentine
            [8] = {x = -2720.92, y = -1666.0, z = 187.51, allowedjob = "valentinepresi"},
            -- Position 9: VanHorn
            [9] = {x = -2589.02, y = -1237.18, z = 86.91, allowedjob = "vanhornpresi"},
        },
    },

    --======================== End of Configuration ========================
}

:shopping_cart: Tebex Store

:arrow_forward: Video Preview (Video Updated)

:page_facing_up: Documentation

:point_right: Join Our Community

Code is accessible Yes(Config.lua / css / html)
Subscription-based No
Lines (approximately) 400+
Requirements VorpCore/RSG
Support Yes
1 Like

Hello!
I will be update the video preview to showcase the newest version of the resource, with a more detailed and comprehensive preview.

1 Like

The video preview updated !

1 Like

I love this system. I am looking forward to putting it in my server.