Jump to content

can i make costum models appear like original models


spoty

Recommended Posts

heloo i wanted to ask

if its possible to remove whole world and make new one with costum models

but can i make the costum models like original models that you can see from a far distance

if it can would you mayby explain me how and or wich functions to make script

becous with setModelLODDistance its like showing part of map on lastmoment when you want to enter it

even if i maxed the distance

Link to comment

https://wiki.multitheftauto.com/wiki/SetLowLODElement

*Hint* *Hint* If your models are optimized enough you can use the same id for both the low lod and the original model without lag.'

for i,v in pairs getElementsByType("object",resourceRoot) do 
local x,y,z = getElementPosition(v) 
local xr,yr,zr = getElementRotation(v) 
setLowLODElement(v,createObject ( getElementModel(v), x,y,z,xr,yr,zr,true ) 
end 

Link to comment

codyL's code have few errors

so i edited his script and tested and it works

local objects = getElementsByType("object") 
for i, v in ipairs(objects) do 
local x,y,z = getElementPosition(v) 
local xr,yr,zr = getElementRotation(v) 
setLowLODElement(v,createObject ( getElementModel(v), x,y,z,xr,yr,zr,true ) 
) 
end 

Link to comment
codyL's code have few errors

so i edited his script and tested and it works

local objects = getElementsByType("object") 
for i, v in ipairs(objects) do 
local x,y,z = getElementPosition(v) 
local xr,yr,zr = getElementRotation(v) 
setLowLODElement(v,createObject ( getElementModel(v), x,y,z,xr,yr,zr,true ) 
) 
end 

can i just add this to my map.lua or to my object replace script?

sorry i am just confused about how to properly use it

thanks :)

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