Bablo ResourcesDocs

Work Van

Every work order uses one van for the whole crew. It is brought out in the van bay next to the depot, every crew member gets the keys, and the route only pays out once the van is back in the bay.

LUA
Config.Job = {
    returnRadius = 15.0,
    van = {
        model = 'burrito3',
        coords = vector4(743.58, 131.81, 80.07, 241.38),
        spawnOnStart = true,
        spawnSide = 'server',
    },
}

These keys sit in Config.Job together with the other job settings.

KeyDefaultMeaning
van.modelburrito3The vehicle model.
van.coordsSee aboveThe van bay. A vector4: position and heading. The van appears here and has to be parked here again.
van.spawnOnStarttruetrue brings the van out as soon as the leader starts a route. false makes the leader collect it at the dispatcher first.
van.spawnSideserverserver: the server creates the van. client: the leader’s game creates it, and the server checks that it is the right model, belongs to the leader and stands within 25 metres of the bay.
returnRadius15.0Metres from the bay the van may stand when it is returned.

Getting the van

With spawnOnStart = true the van appears in the bay the moment the leader starts the route. If it cannot be brought out, the leader sees why (see the table below) and the route waits at the Collect service van step.

With spawnOnStart = false the route starts at the Collect service van step. A blip and a waypoint lead to the van bay. The leader picks Collect work van at the dispatcher, or Collect service van in the work order menu.

SituationMessage
You are not the crew leaderOnly the crew leader can do that.
You are more than Config.Job.depotDistance metres from the dispatcherReturn to the depot to collect the work van.
A vehicle stands within 4 metres of the bayThe van bay is occupied. Clear it and try again.
The van could not be createdThe van could not be dispatched. Try again.
The crew already has a van or no work orderYour crew already has a van or has no active work order.

Once the van is out, the crew moves on to the boxes and the waypoint jumps to the middle of the route’s boxes. See Mission HUD & Waypoints.

Keys and fuel

As soon as the van has loaded in for a crew member, their game gives them the keys and fills the tank. Every member gets keys, not only the leader.

The keys go through the first of these resources that is started, checked in this order:

ResourceHow the keys are given
qbx_vehiclekeysBy the server, with its GiveKeys export.
Renewed-VehiclekeysThe addKey export, with the plate.
wasabi_carlockThe GiveKey export, with the plate.
qs-vehiclekeysThe GiveKeys export, with the plate.
tgiann-hotwireThe tgiann-hotwire:addKey event, with the plate.
cd_garageThe cd_garage:AddKeys event, with the plate.
qb-vehiclekeysThe vehiclekeys:client:SetOwner event, with the plate.

For another key script, add it to frameworks/vehiclekeys/client.lua. The file is not encrypted.

The tank is filled with GTA’s own fuel level (SetVehicleFuelLevel to 100). The script has no bridge for fuel resources.


On the road

  • Keep the van close. You can only open a box, or help at one, while your crew’s van is within 150 metres of you: Park your crew van near the work site.
  • Losing the van. The server checks every few seconds whether the van still exists. If it is gone, for example because an admin or a cleanup script deleted it, the work order is cancelled without pay and the boxes are free again. The leader is told Your work van was lost. Select a new order at the depot. The crew stays together and can pick a new route.
  • The van is also removed when the leader cancels the work order, when the last crew member leaves and when the resource stops.

Returning the van

When the last box is repaired, the mission panel shows Return van & collect pay and a waypoint leads to the van bay.

  1. Park the van within returnRadius metres of the bay.
  2. Everyone gets out.
  3. The leader walks to the dispatcher, staying within returnRadius metres of the van, and picks Return van and get paid. Return van & collect pay in the work order menu does the same.
SituationMessage
The leader is not at the dispatcher, or more than returnRadius metres from the vanBring your crew van back to the depot.
The van stands more than returnRadius metres from the bayPark the van in the depot return area.
A player sits in the vanEveryone must exit the van before returning it.
The payments could not be recordedPayment storage is unavailable. Keep your van and try returning it again.

When the return goes through, the van is removed and every crew member is paid. See Payouts.