Jump to content

Custom model loading


marxist

Recommended Posts

Hi,

I have some (well, actually, a lot) of custom models in my local MTA server. For ease, I've added a superman resource so I can fly around to test my models.

When I first fly over to my custom mapped area (with custom models), they load perfect and no issues. If I fly away and fly back again a couple of minutes later, most of the models have returned to the default GTA SA model before I replaced them. Note, not all revert back to the default model, but most. I don't know what's causing this and it's really annoying, I was wondering if anyone could help me. I've searched and searched and can't find anything that can help me so far.

 

Link to comment
16 minutes ago, MrTasty said:

Perhaps it could be the order of loading such models causing this problem. Are you sure you're loading in this order: COL, TXD, DFF?

The issue seems not to be replicating anymore for some reason, maybe something I changed.

Another thing I wish to ask about is the draw distance with custom models. From afar, the model is the default SA model until I get closer. How can I make it so from afar it's the custom model? It's annoying to see huge buildings in the middle of my mapping from far away.

Link to comment
56 minutes ago, MrTasty said:

Perhaps it could be the order of loading such models causing this problem. Are you sure you're loading in this order: COL, TXD, DFF?

I was loading them in this order: TXD, DFF, COL. I've changed it to COL, TXD, DFF and it seems to be still having issues :/

Edited by marxist
Link to comment
12 minutes ago, CodyJ(L) said:

Yeh need lods, also from the looks of things you're using a dynamic streamer, us a static one.

What's the difference between a static & dynamic?

Also, what do you mean by 'need lods'? setLowLODElement?

Edited by marxist
Link to comment

I've added:

for j, k in ipairs(getElementsByType("object")) do
  	local x, y, z = getElementPosition(k)
  	local rx, ry, rz = getElementRotation(k)
	setLowLODElement(k, createObject(getElementModel(k), x, y, z, rx, ry, rz, true))
end

It has definitely improved most objects, however some still appear to render the default SA object until I get closer.

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