Jump to content

Vehicle parts and shaders


Dzsozi (h03)

Recommended Posts

Hello! I was browsing around and I found an MTA server called NFS:SA MTA, which is obviously a Need For Speed themed gamemode for MTA:SA. The developers of this server made a really nice job with this server and it's resources, but I'm interested in one or two things about some of their scripts, I have no idea how they could make it. So first of all, how is this possible to add tuning parts to a non-tunable vehicle? Like the bumper of a tuned elegy or sultan to a nebula or something? I know that some of the tuning parts are objects, so I can create them via createObject and attach them to the vehicle. But how can I count the position of the tuning part? Or do I have to use a table for every tuning part's position on every vehicle I would like to make tunable, and also, do I have to make a custom tuning shop to apply these tuning parts? How can I save and load a vehicle if it has tuning parts?

Example picture:

 uc0riro.jpg

If I see it right, it is the primo. How is this possible to make a bumper, skirts and etc for that vehicle and attach them? If I'm not mistaken, it is possible to put every spoiler on every vehicle in MTA, how can I do that with other tuning parts as well?

 

The second question I have: how can I make a vinyl for a vehicle and then apply it anywhere I would like to on the car? Example picture:

cUYTKHs.jpg

Again, if I'm not mistaken, devGaming also made it possible, they have tons of (around 500-1000) custom vinyls as png images and it is possible to apply it anywhere on the car.

Example of the devGaming tuning/vinyl system:

RVkdji6.jpg

Link to comment

As for the first one you create an object, attach it and use setElementAttachedOffsets to change its position.

(Edit: To get its position use getElementAttachedOffsets)

As for the vinyls that is something I'm trying to figure out myself; what I've tried just causes it to wrap around the whole vehicle.

Edited by CodyL
Link to comment
1 hour ago, CodyL said:

As for the first one you create an object, attach it and use setElementAttachedOffsets to change its position.

(Edit: To get its position use getElementAttachedOffsets)

As for the vinyls that is something I'm trying to figure out myself; what I've tried just causes it to wrap around the whole vehicle.

So I guess I have to use tables for that with the object, and the positions of the object for the vehicle. So a lots of data should be given.

 

40 minutes ago, MrTasty said:

Pretty sure the vehicles need to have modded UV wraps to have no overlapping parts.

What does that mean? How is this possible to do that and if I did that how should I do the scripting part?

Link to comment

I am by no means a modder and I do not know how to edit cars but I do know that the server from the last screenshot on the initial post, devGaming, did have to mod their vehicles' DFFs to get UVs unwrapped. The scripted part is simply drawing an image on a 2D map as you can see on on the red image on the right of the screenshot.

Link to comment

Well, actually that could be the case for the bumpers and skirts, since they look so smooth and correctly fitting, but that would involve lots of modelling I guess, since you have to make and add them in, for example 3ds max as a part of the vehicle.

Quote

Adding variants requires modifying your DFF by adding a part of the model you wish to be a variant and naming it extra1, extra2, extra3, extra4 or extra5 then setting it's parent to the chassis_dummy this tells GTA it has variant information and after this your variant will work in MTA.

But I think there is an easier way than this. I'm not sure.

Link to comment

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...