Jump to content

different mods on singular SA vehicle model


dqlepy

Recommended Posts

Hello,

I am willing to add multiple mods ( .txd .dff ) for example on a ((BMX SA Model : 481)) and I was wondering, how I could accomplish that, because I know that it is possible, another Latvian server had it, but it is currently inactive, and I am trying to make a project of my own, for me and my friends, so we can have fun on our own, so if anyone could help me get that done, I would be highly grateful.. I heard something about shaders, maybe that’s what they had done, if so, could someone explain, walk me through it, on how I could do that? My discord, just in case.. dqlepy#9090

Thanks in advance, for any useful help..

Link to comment

engineRequestModel of type "vehicle" with parent ID 481. This function returns to you an newly allocated ID which you can use with engineReplaceModel and engineImportTXD.

However, these IDs do not work server side at all, and are not synchronized across clients either. Client 1's ID for mod 1 may be 100, while Client 2 refers to that same mod as 106. You will need to track these IDs by linking them with something like a model name, perhaps the .dff file's name/path.

Server spawns the parent model, sets element data like "model" to "my/mods/mod1.dff". Clients listen for onClientElementStreamIn and onClientElementDataChange to detect this spawn, check if the model's already allocated and assigned, if so, setElementModel clientside to the custom ID for this particular client, else, allocate model, load dffs and txds, setElementModel clientside to newly allocated ID and save the newly allocated ID with the model's dff name/path so subsequently it can be discovered without loading again. Or you could load all anticipated models early, onClientResourceStart.

If you strictly control resource loading order and each resource's custom replaces, you can reasonably predict which mod will have which ID, but again, this isn't guaranteed in any way -- maybe it works now but in the future it won't, so don't assume the loading order.

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