Jump to content

[QUESTION] Is there such thing as a "preload" function?


Moony

Recommended Posts

The wheel upgrades have a limited amount of wheels. Replacing those can give you a limited amount of options. I was thinking that if I could "preload" more skins, I could make functions that also replace the .txd and .dff for each wheel, thus, surpassing the amount of changable wheels.

Link to comment

I don't really like the idea of making wheels with huge customization options as vehicle components because of big .dff file size. You could make unlimited number of wheels as if they were objects. In this way you have to make regular wheels invisible (setVehicleComponentVisible). Then, inside onClientRender or even better onClientPreRender event you have to copy the position and rotation of default wheels(getVehicleComponentPosition and getVehicleComponentRotation) and set it as the position and rotation for your objects that will represent your wheels. Later, you will want this to be synchronized between other players. onClientElementStreamIn and onClientElementStreamOut events might help.

On the other hard, if you'd like to do this with in-build components, shaders could be used to apply different textures on wheel's parts. And all the components are made separately, but it's stuff related to modeling.

Edited by Hoffmann
  • Like 1
Link to comment

I already have such script. I just wanted to add more variety to the wheel models. I haven't found I way to change the color of the object, so I thought I could add more models while learning about colors.

Edited by Moony
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...