ScriptsM Caravan

ScriptsM Caravan

This script will allow you to buy your camper and ride it around the state with your friends, live in it and get high. Can be integrated for every framework. Default:standalone, esx, qbcore

Installation

Download a resource (opens in a new tab) from keymaster or buy it by buttons at the top

Install optional dependencies.

These resources aren't required but provide additional functionality.

Resource start order

It's important for your resources to start in a logical order to prevent errors from missing dependencies.

start oxmysql # this should be one of the first resources
start ox_lib # if you are using ox_target or ox_inventory
start framework # the name of your framework (i.e. ox_core, es_extended, qb-core)
start qb-target / ox target
start ox_inventory or qb-inventory
start ScriptsM-Caravan

Config

There you can find an config of resource with description for all params

Config = {}
 
Config.Stashes = true -- If you wanna add stashes into interiors, leave it true.
 
Config.StashOpenExport = function() -- Put your export to open stash, below you can see export for ox_inventory. Also change LoadStash event in bridge.lua if you need that.
-- OX INVENTORY 
TriggerServerEvent('ox:loadStashes', platetext, stashslots, stashweight)
exports.ox_inventory:openInventory('stash', platetext)
 
 
 
-- QB INVENTORY
--TriggerServerEvent("inventory:server:OpenInventory", "stash", platetext, {maxweight = stashweight, slots = stashslots})
--TriggerEvent("inventory:client:SetCurrentStash", platetext)
end
 
 
Config.EnterHotkey = 54 -- Enter caravan hotkey
Config.ExitHotkey = 54 -- Exit caravan hotkey
Config.StashHotkey = 54 -- stash open hotkey
Config.UseTarget = true -- Turn on target system
Config.TargetSystem = 'ox' -- ox/qb
 
Config.VehicleOptions = { -- There you can add your own vehicles, change interiors, stash coords and etc
  { 
  modelname = 'camper', --model name of your vehicle
  enterbone = 'window_rr', -- Bone of enter text
  bone_ox = 'window_rr',
  interior = vector3(1184.12, -1635.13, -44.86), -- interior enter coordinate
  exitcoords = vector3(1184.12, -1635.13, -44.86), -- interior exit text coordinates
  stashcoords = vector3(1182.32, -1638.5, -44.45), -- stash coordinates
  EnterText = '[~g~E~w~] Enter Camper', -- Enter text 
  LockedText = '~r~Vehicle is locked~w~', -- Vehicle locked text
  ExitText = '[~g~E~w~] Exit Camper', -- Exit text
  StashText = '[~g~E~w~] Open Stash', -- Open stash text
  StashSlots = 24,
  StashWeight = 20000
  },
  {
  modelname = 'journey', 
  enterbone = 'door_dside_r',
  bone_ox = 'door_dside_r',
  interior = vector3(-0.68, 4.05, 18.31), 
  exitcoords = vector3(-0.68, 4.05, 18.31), 
  stashcoords = vector3(-0.16, 0.92, 18.32), 
  EnterText = '[~g~E~w~] Enter Journey',
  LockedText = '~r~Vehicle is locked~w~', 
  ExitText = '[~g~E~w~] Exit Journey', 
  StashText = '[~g~E~w~] Open Stash',
  StashSlots = 12,
  StashWeight = 10000
  },
  {
  modelname = 'journey2', 
  enterbone = 'door_dside_r',
  bone_ox = 'nil',
  interior = vector3(-0.98, -94.86, 30.95), 
  exitcoords = vector3(-0.98, -94.86, 30.95), 
  stashcoords = vector3(-0.41, -97.29, 30.98), 
  EnterText = '[~g~E~w~] Enter Journey',
  LockedText = '~r~Vehicle is locked~w~', 
  ExitText = '[~g~E~w~] Exit Journey', 
  StashText = '[~g~E~w~] Open Stash',
  StashSlots = 16,
  StashWeight = 15000
  },
  --{
  --modelname = 'Car model name', 
  --enterbone = 'Enter interior text bone', 
  --interior = vector3(0, 0, 0), 
  --exitcoords = vector3(0, 0, 0), 
  --stashcoords = vector3(0, 0, 0), 
  --EnterText = '[~g~E~w~] Enter interior text',
  --LockedText = '[~r~Vehicle is locked text~w~]',
  --ExitText = '[~g~E~w~] Exit interior text', 
  --StashText = '[~g~E~w~] Open Stash text'
  --},
}