Jump to content

New models & collisions bug


Lukis37

Recommended Posts

  
addEventHandler('onClientResourceStart', resourceRoot, 
        function() 
            createObject (id object ,x,y,z,rx,ry,rz)                 
            setTimer ( customObject, 200, 1) 
        end 
    ) 
  
function customObject () 
 local txd = engineLoadTXD 
 engineImportTXD(txd, id)     
 local dff = engineLoadDFF 
 engineReplaceModel(dff, id) 
 local col = engineLoadCOL 
 engineReplaceCOL(col, id) 
engineSetModelLODDistance(id, 1000) 
end 
  

For Problem post here the id object and coordinate.

Link to comment
function onResourceStart() 
  
txd = engineLoadTXD ( "txds.txd" ) 
engineImportTXD ( txd, 3643 ) 
dff = engineLoadDFF ( "model.dff", 3643 ) 
engineReplaceModel ( dff, 3643 ) 
col = engineLoadCOL ( "model.col" ) 
engineReplaceCOL ( col, 3643 ) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) 

I've it like this.

Link to comment

For Custom Object createObject is better :wink:

  
function onResourceStart() 
createObject (3643,x ,y ,z ,rx ,ry ,rz)  -- Click [url=https://wiki.multitheftauto.com/wiki/CreateObject]HERE[/url] for info about createObject          
setTimer ( customObject, 200, 1) 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),onResourceStart) 
  
function customObject () 
txd = engineLoadTXD ( "txds.txd" ) 
engineImportTXD ( txd, 3643 ) 
dff = engineLoadDFF ( "model.dff", 3643 ) 
engineReplaceModel ( dff, 3643 ) 
col = engineLoadCOL ( "model.col" ) 
engineReplaceCOL ( col, 3643 ) 
engineSetModelLODDistance(3643, 1000) -- u forget the distance  
end 
  
  
  

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