🏠Pay & Spray Locations

Easily add locations for pay & spray services, these can be public use or restricted by jobs in Config.Locations


  • The key is the location name and must be unique

  • Zone coords and size must be vec3

  • Shop coords must be vector3

  • Draw markers for locations can be disabled per location in the marker table

  • Vehicles can be blacklisted from using the pay & spray services in the blacklist table

  • Job restrictions can be set via the job table and enabling it


  • The key is the location name and must be unique

['Custom Pay & Spray Location'] = {
    ---
},

['Custom Pay & Spray Location'] = {
    blip = { -- blip settings
        enabled = true, -- enable blip for this location
        id = 72, -- blip id
        colour = 3, -- blip colour
        scale = 0.8, -- blip scale
        title = 'Pay & Spray', -- blip name (keep the same name to group them up like Pay & Spray to save blip space)
    },
    ---
},

  • To enable visual debugging of the zone location set debug to true

  • The coords must be a vec3 value

  • The siize must be a vec3 value

  • The rotation is the zone heading

  • To disable markers for locations set enabled to false in the marker table

  • Draw marker information can be found here: https://docs.fivem.net/docs/game-references/markers/

['Custom Pay & Spray Location'] = {
    ---
    zone = { -- zone settings
        debug = false, -- debug zone
        coords = vec3(-211.75, -1324.39, 31.0), -- zone coords must be vec3
        size = vec3(7.5, 7.5, 7.5), -- zone size must be vec3
        rotation = 357.68, -- zone rotation (heading)
        marker = {
            enabled = true, -- enable marker to show shop location
            type = 36, -- marker type
            drawDist = 25.0, -- draw distance
            scale = vec3(0.6,0.6,0.6), -- marker scale
            color = { r=255, g=200, b=0, a=180 }, -- marker colour
            bobUpAndDown = true, -- marker bob up & down
            faceCamera = true, -- marker face camera
            rotate = true, -- marker rotate
            zOffset = 0.5 -- z offset so it doesnt sit in the ground
        },
    },
},

  • You can set vehicles to be blacklisted and unable to use the Pay & Spray services

  • To blacklist a vehicle ensure enabled is set to true

  • Define the black listed vehicle by spawn name in the vehicles table

['Custom Pay & Spray Location'] = {
    ---
    blacklist = { -- black list settings
        enabled = true, -- enable black list vehicles here
        vehicles = { -- spawn name of vehicle to be black listed
            'adder',
            --add black list vehicle names as required
        },
    },
},

  • To set a pay & spray location as job restricted set enabled to true in the job table

  • Define the job by name in the allowed table

['Custom Pay & Spray Location'] = {
    ---
    job = { -- job settings
        enabled = true, -- enable a job restriction at this location
        allowed = { -- job names
            'bennys',
            --add more job names as required
        },
    },
},

  • You can set pay & spray locations to have a built in shop system where if required players can purchase required items to use the pay & spray services

  • The coords must be a vector3 value

  • The draw marker can be disabled if required

  • The inventory is a table of items available to purchase

  • The amount is the amount available to purchase at once

  • The cost is the price of that item per unit to purchase

['Custom Pay & Spray Location'] = {
    ---
    shop = { -- shop settings
        enabled = true, -- enable the shop
        coords = vector3(-200.74, -1318.73, 31.09), -- shop zone coords must be vector3
        radius = 2, -- zone radius
        icon = 'fa-solid fa-basket-shopping', -- target icon
        label = 'Open Tool Shop', -- target label
        distance = 3.0, -- target distance
        marker = {
            enabled = true, -- enable marker to show shop location
            type = 29, -- marker type
            drawDist = 25.0, -- draw distance
            scale = vec3(0.6,0.6,0.6), -- marker scale
            color = { r=255, g=200, b=0, a=180 }, -- marker colour
            bobUpAndDown = true, -- marker bob up & down
            faceCamera = true, -- marker face camera
            rotate = true, -- marker rotate
            zOffset = 0.5 -- z offset so it doesnt sit in the ground
        },
        inventory = {
            {name = 'spraypaint',   amount = 100, cost = 50, },
            {name = 'toolbox',      amount = 100, cost = 50, },
            {name = 'vinylwrap',    amount = 100, cost = 50, },
        },
    },
},

  • If the location is job locked make sure to set cost to 0 as the jobs are able to use the /pnsbilling command to charge customers for services. If public determine the price for this locaiton to suit your server economy.

  • The duration is the timer for the progress circle to complete the spraying

  • Define camera offsets for each location for the spraying camera

  • Enable a required item for spraying if desired. The name is the item name and you can optionally set that item to be removed upon completion

['Custom Pay & Spray Location'] = {
    ---
    spraying = { -- spraying settings
        cost = 0, -- cost to spray here if not job locked if job locked set to 0 as they use the billing command
        duration = 10000, -- duration to spray vehicle
        camera = { -- spray camera settings (this is used by the reparing & liveries)
            radius = 3.8, -- distance from car
            height = 1.4, -- camera height
            speed = 0.25, -- degrees per tick
            zOffset = 0.5, -- z offset
        },
        requiredItem = { -- required item settings
            enabled = true, -- enable a required item
            name = 'spraypaint', -- name of required item
            remove = true, -- remove the item or not
        },
        progress = { -- progressCircle  settings
            label = 'Spraying vehicle', -- label
            anim = { -- animation settings
                anim = 'switch@franklin@lamar_tagging_wall', -- anim name
                dict = 'lamar_tagging_wall_loop_lamar', -- anim dict
                flag = 49, -- anim flag
            },
            prop = { -- prop settings
                model = 'prop_paint_spray01b', -- prop name
                bone = 28422, -- bone index
                pos = vec3(0, -0.01, -0.012), -- prop position must be vec3
                rot = vec3(0, 0, 0), -- prop rotation must be vec3
            },
        },
    },
},

  • If the location is job locked make sure to set cost to 0 as the jobs are able to use the /pnsbilling command to charge customers for services. If public determine the price for this locaiton to suit your server economy.

  • The duration is the timer for the progress circle to complete the livery application

  • Enable a required item for liveries if desired. The name is the item name and you can optionally set that item to be removed upon completion

['Custom Pay & Spray Location'] = {
    ---
    livery = { -- spraying settings
        cost = 0, -- cost to apply livery here if not job locked if job locked set to 0 as they use the billing command
        duration = 10000, -- duration to spray vehicle
        requiredItem = { -- required item settings
            enabled = true, -- enable a required item
            name = 'vinylwrap', -- name of required item
            remove = true, -- remove the item or not
        },
        progress = { -- progressCircle  settings
            label = 'Applying vinyl', -- label
            anim = { -- animation settings
                anim = 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@', -- anim name
                dict = 'machinic_loop_mechandplayer', -- anim dict
                flag = 49, -- anim flag
            },
            prop = { -- prop settings
                model = 'v_ind_cs_spanner03', -- prop name
                bone = 57005, -- bone index
                pos = vec3(0.11, 0.02, -0.02), -- prop position must be vec3
                rot = vec3(-7.0, -11.0, -18.0), -- prop rotation must be vec3
            },
        },
    },
},

  • If the location is job locked make sure to set cost to 0 as the jobs are able to use the /pnsbilling command to charge customers for services. If public determine the price for this locaiton to suit your server economy.

  • The duration is the timer for the progress circle to complete the livery application

  • Enable a required item for repairs if desired. The name is the item name and you can optionally set that item to be removed upon completion

['Custom Pay & Spray Location'] = {
    ---
    repairing = { -- repair settings
        cost = 0, -- cost to repair here if not job locked if job locked set to 0 as they use the billing command
        duration = 10000, -- duration to repair vehicle
        requiredItem = { -- required item settings
            enabled = true, -- enable a required item
            name = 'toolbox', -- name of required item
            remove = true, -- remove the item or not
        },
        progress = { -- progressCircle settings
            label = 'Repairing vehicle', -- label
            anim = { -- animation settings
                anim = 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@', -- anim name
                dict = 'machinic_loop_mechandplayer', -- anim dict
                flag = 49, -- anim flag
            },
            prop = { -- prop settings
                model = 'v_ind_cs_spanner03', -- prop name
                bone = 57005, -- bone index
                pos = vec3(0.11, 0.02, -0.02), -- prop position must be vec3
                rot = vec3(-7.0, -11.0, -18.0), -- prop rotation must be vec3
            },
        },
    },
},

Last updated