Configuration

This page contains all information you need to configure gfg_deliveries, if you have any questions feel free to reach out to us on our discord.

Variables that are marked as (Optional) do not need to be set (but can be in the case of further customization).

Config

Config = {
    language = "en",                                     
    debug = false,                                        
    enhancedDebug = false,                                
    interactionMethod = "3dtext",                        
    interactionDistance = 2,                             
    truckInteractionDistance = 0.5,                      
    drawMarker = {
        enable = true,                                   
        type = 3,                                        
        scale = vec3(1.0, 1.0, 0.5),                     
        color = {r = 255, g = 255, b = 255, alpha = 100},
        bob = true,                                      
        faceCamera = true                                
    },
    inventory = "ox_inventory",                          
    useKeys = true,                                      
}

language

Language sets which Locale to use, you can find available locales in [gfg_deliveries/locale/], we will add more as they become available but feel free to add your own.

language = "en", 

debug

Debug should only used in a development environment

Determines whether to send debug print statements to the client and server when using the script

debug = true

enhancedDebug

Enhanced Debug should only used in a development environment

Determines whether to send enhanced debug print statements to the client and server when using the script

enhancedDebug = false,

interactionMethod

Determines the method in which players interact. Currently supported options are: "target", "textui", "3dtext".

interactionMethod = "3dtext",

interactionDistance

Determines the distance from the interaction point that the interaction is activated.

interactionDistance = 2,

truckInteractionDistance

Determines the distance from the truck bone that the interaction is available.

truckInteractionDistance = 0.5,

drawMarker

Determines 3d marker variables.

  • enable = Determines whether to draw a 3d marker at the drop-off point.

  • type = Determines the type of marker to draw.

  • scale = Determines the scale of the marker.

  • color = Determines the color and transparency of the marker.

    • r = Red

    • g = Green

    • b = Blue

    • alpha = Transparency

  • bob = Determines whether the marker bobs up and down.

  • faceCamera = Determines if the marker always faces the camera.

drawMarker = {
    enable = true,                                   
    type = 3,                                        
    scale = vec3(1.0, 1.0, 0.5),                     
    color = {r = 255, g = 255, b = 255, alpha = 100},
    bob = true,                                      
    faceCamera = true                                
},

inventory

if inventory = 'custom' the payout events in sv_customize.lua are used.

Determines wich inventory resource to use. Currently supported options are: "ox_inventory", "qb_inventory" or "custom".

inventory = "ox_inventory",

useKeys

Determines whether or not to trigger the give and remove keys function in sv_customize.lua.

useKeys = true,

Config.Defaults

Configuration for the default values used if specific variable for a delivery type are omitted.

Config.Defaults = {                          
    ped = {                                
        model = 's_m_m_postal_01',         
        scenario = 'WORLD_HUMAN_CLIPBOARD',
    },
    blip = {                               
        sprite = 67,                       
        scale = 0.7,                       
        color = 60,                        
    },
    reward = {                             
        type = "item",                     
        itemName = "money",                
        distanceMultiplier = 0.2,          
        boxWorth = 25,                     
        amount = 100                       
    },
    stops = {                              
        blip = {                           
            sprite = 538,                  
            scale = 0.7,                   
            color = 60                     
        }
    },
    vehicle = {                            
        bone = 'door_dside_r',             
    }
}

ped

Determines default ped variables.

  • model = Determines the default ped model.

  • scenario = Determines the default ped scenario.

ped = {                                
    model = 's_m_m_postal_01',         
    scenario = 'WORLD_HUMAN_CLIPBOARD',
},

blip

Determines default blip variables.

  • sprite = Determines the default blip sprite.

  • scale = Determines the default blip scale.

  • color = Determines the default blip color.

blip = {                               
    sprite = 67,                       
    scale = 0.7,                       
    color = 60,                        
},

reward

Determines default reward variables.

  • type = Determines the default reward type, supported options are "bank" and "item".

  • itemName = Determines the default item reward name, only used if 'reward.type' is 'item'.

  • distanceMultiplier = Determines the default distance multiplier.

  • boxworth = Determines the default value for each package delivered.

  • amount = Determines the default value for each stop completed.

reward = {                             
    type = "item",                     
    itemName = "money",                
    distanceMultiplier = 0.2,          
    boxWorth = 25,                     
    amount = 100                       
},

stops

Determines default stop variables.

  • blip = Determines default stop blip variables.

    • sprite = Determines the default stop blip sprite.

    • scale = Determines the default stop blip scale.

    • color = Determines the default stop blip color.

stops = {                              
    blip = {                           
        sprite = 538,                  
        scale = 0.7,                   
        color = 60                     
    }
},

vehicle

Determines the default vehicle variables.

  • bone = Determines the default vehicle interaction bone.

vehicle = {                            
    bone = 'door_dside_r',             
}

Config.DeliveryTypes

Configuration for the various delivery types.

They 'key' of each entry is the name of the delivery type and needs to be unique

Config.DeliveryTypes = {
    ['Go Postal'] = {                                           
        ped = {                                                 
            coords = vec4(78.6920, 111.8125, 81.1682, 243.2043),
            model = 's_m_m_postal_01',                          
            scenario = 'WORLD_HUMAN_CLIPBOARD',                 
        },
        blip = {                                                
            label = "Go Postal Deliveries",                     
            sprite = 67,                                        
            scale = 0.7,                                        
            color = 60,                                         
        },
        vehicle = {                                             
            model = -233098306, 
            coords = {                                          
                vec4(61.3824, 125.1748, 79.2214, 157.9575),     
                vec4(66.1251, 123.9437, 79.1611, 157.8927),
                vec4(69.6611, 122.9135, 79.1693, 154.1517),
                vec4(73.4137, 120.9988, 79.1908, 157.8834),
            },
            image = 'https://gtacars.net/images/5fba0818d071f7ff7a1f03d41d2564a0',
            bone = 'door_dside_r', 
        },
        boxes = {                                               
            minAmount = 1,                                      
            maxAmount = 2                                       
        },
        reward = {                                              
            type = "item",                                      
            itemName = "money",                                 
            distanceMultiplier = 0.2,                           
            boxWorth = 25,                                      
            amount = 100                                        
        },
        stops = {                                               
            minAmount = 5,                                      
            maxAmount = 10,                                     
            blip = {                                            
                sprite = 538,                                   
                scale = 0.7,                                    
                color = 18,                                     
            },
            locations = CommonDeliverys.locations,              
            targets = CommonDeliverys.targets                   
            
        }
    },
}

ped

Determines ped variables.

  • coords = Determines the coords of the ped (Needs to be a vector4).

  • model = Determines the ped model. (Optional)

  • scenario = Determines the ped scenario. (Optional)

ped = {                                                 
    coords = vec4(78.6920, 111.8125, 81.1682, 243.2043),
    model = 's_m_m_postal_01',                          
    scenario = 'WORLD_HUMAN_CLIPBOARD',                 
},

blip

Determines blip variables.

  • label = Determines the label of the blip.

  • sprite = Determines the blip sprite. (Optional)

  • scale = Determines the blip scale. (Optional)

  • color = Determines the blip color. (Optional)

blip = {                                                
    label = "Go Postal Deliveries",                     
    sprite = 67,                                        
    scale = 0.7,                                        
    color = 60,                                         
},

vehicle

Determines the vehicle variables.

  • model = Determines the model of vehicle to be provided (Needs to be the signed hash).

  • coords = Determines the locations where vehicles will be spawned (Needs to be a vector4).

  • image = Determines the image to be displayed in the menu.

  • bone = Determines the vehicle interaction bone. (Optional)

vehicle = {                                             
    model = -233098306, 
    coords = {                                          
        vec4(61.3824, 125.1748, 79.2214, 157.9575),     
        vec4(66.1251, 123.9437, 79.1611, 157.8927),
        vec4(69.6611, 122.9135, 79.1693, 154.1517),
        vec4(73.4137, 120.9988, 79.1908, 157.8834),
    },
    image = 'https://gtacars.net/images/5fba0818d071f7ff7a1f03d41d2564a0',
    bone = 'door_dside_r', 
},

boxes

Determines the amount of boxes per stop.

  • minAmount = Minimum amount.

  • maxAmount = Maximum amount.

boxes = {                                               
    minAmount = 1,                                      
    maxAmount = 2                                       
},

reward

Determines reward variables. (Optional)

  • type = Determines the reward type, supported options are "bank" and "item". (Optional)

  • itemName = Determines the item reward name, only used if 'reward.type' is 'item'. (Optional)

  • distanceMultiplier = Determines the distance multiplier. (Optional)

  • boxworth = Determines the value for each package delivered. (Optional)

  • amount = Determines the value for each stop completed. (Optional)

reward = {                                              
    type = "item",                                      
    itemName = "money",                                 
    distanceMultiplier = 0.2,                           
    boxWorth = 25,                                      
    amount = 100                                        
},

stops

Locations and targets need to be in the same order (1st entry in targets, is the dropoff target for the 1st entry in locations).

Determines stop variables.

  • minAmount = Determines the minimum amount of stops.

  • maxAmount = Determines the maximum amount of stops.

  • blip = Determines stop blip variables. (Optional)

    • sprite = Determines the stop blip sprite. (Optional)

    • scale = Determines the stop blip scale. (Optional)

    • color = Determines the stop blip color. (Optional)

  • locations = Determines the stops that can be chosen for this delivery type.

  • targets = Determines the drop-off targets for this delivery type.

stops = {                                               
    minAmount = 5,                                      
    maxAmount = 10,                                     
    blip = {                                            
        sprite = 538,                                   
        scale = 0.7,                                    
        color = 18,                                     
    },
    locations = CommonDeliverys.locations,              
    targets = CommonDeliverys.targets 
}

Last updated