Shop Types

There are currently three shop types that you can create in ti_vehicleShops All config is stored in the shops.lua file.

  • Menu - Simple, uses context style UI's for all interactions.

  • NUI - Using NUI and a display vehicle, emulates a "showroom" style shop. - Any vehicle purchased through this method can have a custom colour selected before purchase.

  • Showroom - Open-world showroom.

shops.testMenu = {
    label = "Test Menu Shop",    -- Label, for UI interactions
    typeof = "menu",             -- Shop type
    interior = false,            -- Interior ID to load (OPTIONAL)
    financeable = true,          -- Can finance at this shop?
    minDownpayment = 10,         -- Min downpayment (percentage)
    maxRepayments = 10,          -- Max amount of repayments
    financeTime = 5,             -- Days to repay finance before warning
    repoWarningTime = 5,         -- Minutes to make repayment after warning before repo
    
    -- Blip options
    blip = {
        label = "Test Menu Shop",
        position = vector3(-1312.18,-1597.55,4.23),
        sprite = 225,
        color = 57,
        alpha = 255,
        scale = 0.7,
        display = 2,
        highDetail = true,
        shortRange = true
    },
    
    -- Class restrictions.
    -- For more information, see: https://docs.fivem.net/natives/?_0x29439776AAA00A62
    -- For no restrictions, use -1
    classRestrictions = {
        0,1,2,3
    },
    
    -- OPTIONAL
    -- Restrict access to these character identifiers
    characterRestrictions = {
        'ABC:123'
    },

    -- OPTIONAL
    -- Restrict access to these job names
    -- jobName = minRank
    jobRestrictions = {
        police = 1
    },

    -- OPTIONAL
    -- Restrict access to these group names
    -- groupName = minRank
    groupRestrictions = {
        ballas = 2
    },

    -- Locations
    locations = {
        -- Location to spawn purchased/test-driven vehicles
        vehSpawn = {
            position = vector3(-1311.39,-1603.94,4.23),
            heading = 302.86
        },

        -- Location of the interaction menu while on foot
        pedMenu = {
            position = vector3(-1312.18,-1597.55,4.23),
            interactDist = 2.0,
        },

        -- Vehicle preview cam location
        showroomCam = {
            position = vector3(-1311.86,-1599.61,5.41)
        }, 

        -- Preview vehicle location
        showroomVeh = {
            position = vector3(-1311.39,-1603.94,4.23),
            heading = 302.86
        }
    }    
}

NUI

shops.testNui = {    
    label = "Test NUI Shop",    -- Label, for UI interactions
    typeof = "nui",             -- Shop type
    interior = 285953,          -- Interior ID to load (OPTIONAL)
    financeable = false,        -- Can finance at this shop?
    minDownpayment = false,     -- Min downpayment (percentage)
    maxRepayments = false,      -- Max amount of repayments
    financeTime = false,        -- Days to repay finance before warning
    repoWarningTime = false,    -- Minutes to make repayment after warning before repo
    
    -- Blip options
    blip = {
        label = "Test NUI Shop",
        position = vector3(-1166.28,-1744.40,4.01),
        sprite = 225,
        color = 57,
        alpha = 255,
        scale = 0.7,
        display = 2,
        highDetail = true,
        shortRange = true
    },
    
    -- Class restrictions.
    -- For more information, see: https://docs.fivem.net/natives/?_0x29439776AAA00A62
    -- For no restrictions, use -1
    classRestrictions = {
        0,1,2,3,4,5,6,7,8
    },
    
    -- OPTIONAL
    -- Restrict access to these character identifiers
    characterRestrictions = false,

    -- OPTIONAL
    -- Restrict access to these job names
    -- jobName = minRank
    jobRestrictions = {
        police = 1,
        mechanic = 2
    },

    -- OPTIONAL
    -- Restrict access to these group names
    -- groupName = minRank
    groupRestrictions = false,

    -- Locations
    locations = {
        -- Location to spawn purchased/test-driven vehicles
        vehSpawn = {
            position = vector3(-1166.28,-1744.40,4.01),
            heading = 256
        },

        -- Location of the interaction menu while on foot
        pedMenu = {
            position = vector3(-1166.28,-1744.40,4.01),
            interactDist = 2.0,
        },

        -- Vehicle preview cam location
        showroomCam = {
            position = vector3(-1332.21,146.94,-96.87)
        }, 

        -- Preview vehicle location
        showroomVeh = {
            position = vector3(-1327.08,142.80,-99.19),
            heading = 137.03
        }
    }
}

Showroom

shops.testShowroom = {
    label = "Test Showroom Shop",    -- Label, for UI interactions
    typeof = "showroom",             -- Shop type
    interior = false,                -- Interior ID to load (OPTIONAL)
    financeable = true,              -- Can finance at this shop?
    minDownpayment = 10,             -- Min downpayment (percentage)
    maxRepayments = 10,              -- Max amount of repayments
    financeTime = 5,                 -- Days to repay finance before warning
    repoWarningTime = 5,             -- Minutes to make repayment after warning before repo
    
    -- Blip options
    blip = {
        label = "Test Showroom Shop",
        position = vector3(249.83,-1149.54,29.28),
        sprite = 225,
        color = 57,
        alpha = 255,
        scale = 0.7,
        display = 2,
        highDetail = true,
        shortRange = true
    },

    -- Class restrictions.
    -- For more information, see: https://docs.fivem.net/natives/?_0x29439776AAA00A62
    -- For no restrictions, use -1
    classRestrictions = {
        -1
    },
    
    -- OPTIONAL
    -- Restrict access to these character identifiers
    characterRestrictions = false,

    -- OPTIONAL
    -- Restrict access to these job names
    -- jobName = minRank
    jobRestrictions = false,

    -- OPTIONAL
    -- Restrict access to these group names
    -- groupName = minRank
    groupRestrictions = false,

    -- Locations
    locations = {
        -- Point at which to consider spawning display vehicles
        spawnRadius = {
            position = vector3(249.83,-1149.54,29.28),
            distance = 50.0
        },

        -- Location to spawn purchased/test-driven vehicles
        vehSpawn = {
            position = vector3(254.32,-1155.31,29.25),
            heading = 93.51
        }
    },

    -- Display vehicle points
    -- Add as many as you like
    displays = {
        {
            position = vector3(249.83,-1149.54,29.28),
            heading = 181.91,
            model = "banshee"
        },
        {
            position = vector3(256.16,-1149.45,29.29),
            heading = 181.91,
            model = "banshee2"
        },
        {
            position = vector3(262.29,-1149.74,29.29),
            heading = 181.91,
            model = "buffalo2"
        },
    }
}

Last updated