Locations
Locations are defined in config/locations.lua. There are two types: drops (where sellers deposit items) and pickups (where buyers collect orders).
Each location must have a unique id. This ID is stored in the database, so never change or reuse it after the resource has been used.
Drops
Drop locations are where sellers deposit their items after creating listings. They can be either NPC contacts or box zones.
NPC Drop
Spawns a ped that the seller interacts with to open a stash.
{
id = 'drop_5',
coords = vec4(970.04, -200.51, 73.21, 60.78),
ped = `s_m_y_dealer_01`,
scenario = 'WORLD_HUMAN_STAND_IMPATIENT',
}, You can also use an animation instead of a scenario:
{
id = 'drop_example',
coords = vec4(970.04, -200.51, 73.21, 60.78),
ped = `s_m_y_dealer_01`,
anim = {
dict = 'anim_dict',
name = 'anim_name',
flag = 1,
},
}, Zone Drop
Creates a box zone the seller interacts with directly (no NPC).
{
id = 'drop_1',
coords = vec4(-606.0, -1666.5, 20.0, 0.0),
size = vec3(1.5, 1.5, 2.0),
rotation = 0.0,
}, Pickups
Pickup locations are where buyers collect their purchased items. There are three types: NPC, zone, and vehicle.
NPC Pickup
Spawns a ped the buyer interacts with to access a stash.
{
id = 'pickup_6',
type = 'npc',
coords = vec4(755.36, -920.33, 25.22, 4.27),
ped = `s_m_y_dealer_01`,
scenario = 'WORLD_HUMAN_STAND_IMPATIENT',
}, Zone Pickup
Creates a box zone with a progress bar interaction.
{
id = 'pickup_2',
type = 'zone',
coords = vec4(1054.3, -545.0, 61.0, 0.0),
size = vec3(5.0, 4.0, 4.0),
rotation = 0.0,
}, Vehicle Pickup
Spawns a locked vehicle that the buyer must lockpick before accessing the trunk stash.
{
id = 'pickup_1',
type = 'vehicle',
coords = vec4(793.0349, -2990.8430, 6.0205, 270.0),
vehicleModel = 'burrito3',
}, You can optionally specify a vehicleType (defaults to 'automobile'):
{
id = 'pickup_example',
type = 'vehicle',
coords = vec4(793.0, -2990.8, 6.0, 270.0),
vehicleModel = 'burrito3',
vehicleType = 'automobile',
}, Full Example
return {
drops = {
{
id = 'drop_1',
coords = vec4(-606.0, -1666.5, 20.0, 0.0),
size = vec3(1.5, 1.5, 2.0),
rotation = 0.0,
},
{
id = 'drop_2',
coords = vec4(970.04, -200.51, 73.21, 60.78),
ped = `s_m_y_dealer_01`,
scenario = 'WORLD_HUMAN_STAND_IMPATIENT',
},
},
pickups = {
{
id = 'pickup_1',
type = 'vehicle',
coords = vec4(793.0349, -2990.8430, 6.0205, 270.0),
vehicleModel = 'burrito3',
},
{
id = 'pickup_2',
type = 'zone',
coords = vec4(1054.3, -545.0, 61.0, 0.0),
size = vec3(5.0, 4.0, 4.0),
rotation = 0.0,
},
{
id = 'pickup_3',
type = 'npc',
coords = vec4(755.36, -920.33, 25.22, 4.27),
ped = `s_m_y_dealer_01`,
scenario = 'WORLD_HUMAN_STAND_IMPATIENT',
},
},
}