Jump to content

[REL] Vehicle Cargo Utility Script


Dzsozi (h03)

Recommended Posts

24630.jpg

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.

 

24627.jpg24628.jpg

24629.jpg

 

DOWNLOAD

Edited by Dzsozi (h03)
  • Like 2
  • Thanks 1
Link to comment
  • 3 weeks later...
On 16/10/2018 at 10:06, Dzsozi (h03) said:

Yes, I also believe that.

Sorry, what do you mean by that? With the export functions you get the middle position of the defined vehicle's bed. So from that point on, you can adjust the position of the object by adding or extracting values to/from the position you got.

Really appreciate your help, thanks.

 

Keep up the good work mate, I loved this resource.

  • Thanks 1
Link to comment
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...