Skip to content

Instantly share code, notes, and snippets.

@JohnAllington
Last active May 20, 2024 08:00
Show Gist options
  • Save JohnAllington/c7e7c67d3d26a6f4f176e49ad8b4000e to your computer and use it in GitHub Desktop.
Save JohnAllington/c7e7c67d3d26a6f4f176e49ad8b4000e to your computer and use it in GitHub Desktop.
config.lua file of as_itemtransfer by Allingtonia Scripts
--------------------------------------------------------------------------------------------------------------
-- IF YOU NEED ANY HELP WITH THIS -> https://discord.com/invite/6Kt9RbKN3P
-- DON'T FORGET TO SETUP STASHES IN OX_INVENTORY/DATA/STASHES.LUA
-- Example from video | Located at legion square too
--[[
{
coords = vec3(245.0249, -860.9130, 29.4956),
name = 'teststash1',
label = 'Stash 1',
owner = false,
slots = 70,
weight = 5000000
},
{
coords = vec3(238.0382, -879.3534, 30.4921),
name = 'teststash2',
label = 'Stash 2',
owner = false,
slots = 70,
weight = 5000000
},
]]
--------------------------------------------------------------------------------------------------------------
Config = {}
function L(lk) -- Just ignore it | It's just for translation
if Locales[Config.Locale][lk] then
return Locales[Config.Locale][lk]
else
print('Locale is nil ('..lk..')')
end
end
Config.ESXVersion = "new" -- "new" for exports and "old" for TriggerEvent.
Config.Locale = "EN" -- "DE" | "EN" | "ES" | "FR" - Change the translation in locales.lua to your liking or add a new one.
Config.Notify = "ESX" -- "ESX" | "OKOK" | "OX" | "MYTHIC" - Change the notify to your liking or add a new one.
Config.useStorageNPC = false -- EXPERIMENTAL FEATURE | default = false | DON'T USE IT IN "Config.Marker" WITH "useOwned" IT'S NOT SETUP FOR IT! | It's NOT completely bug-free. Spawns a NPC defined in Config.StorageNPCS who is carrying a crate. Use at your own risk!
Config.StorageNPCS = { -- Ped Models | For Config.useStorageNPC
"s_m_m_lathandy_01",
"s_m_y_construct_01",
"s_m_y_construct_02",
"ig_floyd",
"s_m_m_gardener_01",
"a_m_m_farmer_01",
}
Config.NPCS = { -- Warehouse Employees | You can add as much as you want. | Currently 2 pre-defined (from video) standing at the legion square (234.7737, -869.6268, 30.2922)
[1] = {
id = 1, -- ID of the NPC | To identify the right NPC.
model = "s_m_m_gardener_01", -- Model of the Warehouse Employee.
npcName = "Jack Miller", -- Name of the Warehouse Employee. | If you set "npcName = false" it will use the standard name. (locale.lua -> warehouse_employee)
jobAllowed = false, -- Job that is allowed to use | Job as a "string" for example: (jobAllowed = "ambulance") or "false" as BOOL for example: (jobAllowed = false) so everyone can use him.
gradeAllowed = false, -- Grade that is allowed to use (from this number onwards, all higher) | Grade as number for example: (gradeAllowed = 2) means grade 2 and higher can use or "false" to deactivate (use false if jobAllowed is false).
vehiclePosition = {x = 234.3550, y = -859.8590, z = 29.8875}, -- Position for the experimental StorageNPCS | Should be set near the laodingzone/vehicle.
storagePosition = {x = 245.0273, y = -860.9841, z = 29.4951}, -- Position for the experimental StorageNPCS | Should be set near the stash/storage.
startHeading = 180.0, -- Heading of the experimental StorageNPCS at spawn.
x = 237.5175,
y = -868.9437,
z = 30.2922,
heading = 180.0 -- x, y, z and heading coordinates of the warehouse employee | This is the position where players can interact with the warehouse employee.
},
[2] = {
id = 2,
model = "s_m_m_gardener_01",
npcName = "Ben Brooks",
jobAllowed = "ambulance",
gradeAllowed = 2,
vehiclePosition = {x = 230.8087, y = -877.7807, z = 30.4921},
storagePosition = {x = 237.6567, y = -879.2399, z = 30.4921},
startHeading = 180.0,
x = 236.1219,
y = -872.5350,
z = 30.4921,
heading = 90.0
},
}
Config.Marker = {
[1] = {
id = 1, -- The ID that belongs to the NPC | This must be the same as in Config.NPCS to work.
stashName = "teststash1", -- Name of the stash that belongs to the marker and NPC. | Don't forget to setup stashes in ox_inventory/data/stashes.lua
useOwned = true, -- true or false | If true uses stash with owner | DON'T USE IT WITH "Config.useStorageNPC" IT'S NOT SETUP FOR IT!! | Don't forget to set "owner = true" for stashName in ox_inventory/data/stashes.lua
x = 235.0893,
y = -857.2919,
z = 29.7437, -- x, y, z coordinates of the marker/loadingzone | This is the position where players park their vehicle to unload/load it.
},
[2] = {
id = 2,
stashName = "teststash2",
useOwned = false,
x = 228.2504,
y = -876.9406,
z = 30.4921,
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment