This utility script allows you to get a vehicle's available cargo space position, for example the roof rack of the Perennial, the bed of the Yosemite, the back of the Pony or many more vehicles!
Also, as we know GTA has something called variants for vehicles (https://wiki.multitheftauto.com/wiki/Vehicle_variants), for example a Bobcat either spawns with some Sprunk cans, a single tire or nothing in it's bed.
This resource also allows you to clear the cargo's available space if it is occupied by any unnecessary things (a.k.a. variant) if you need some space for something bigger (makes the vehicle's actual cargo placeholder variants (if there are any) disappear for example the planks in the Picador's bed, also, this same function adds the roof rack variant on the Perennial if it is missing and the function is being called)!
In this resource you can find 2 exported functions:
- getVehicleCargoPlacementPosition (client and server) | returns a table with x, y, z offset positions
- setVehicleCargoSpaceFree (server) | returns true if the vehicle cargo space was cleared, false otherwise
Open the exampleS.lua for further explanations and examples to how to use this script.
DOWNLOAD