Sign in to follow this  
Dzsozi (h03)

[REL] Vehicle Cargo Utility Script

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

Share this post


Link to post

I really love what you did in here.

I believe that RP servers need such features, but I'm going to ask you if you're able to determine exact position for the object you're going to place in the car's bed ?

  • Like 2

Share this post


Link to post

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.

  • Like 1

Share this post


Link to post
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

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.