Lukis37 Posted August 8, 2012 Share Posted August 8, 2012 Hello, I'm Lukis ... I made new models for race: ( You can see here: ) But sometimes someone misses collision for some object. I made command for reload new models and colls. Exist any else way how to prevent it? Help please Link to comment
HunT Posted August 8, 2012 Share Posted August 8, 2012 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
Lukis37 Posted August 9, 2012 Author Share Posted August 9, 2012 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
HunT Posted August 9, 2012 Share Posted August 9, 2012 For Custom Object createObject is better 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
Lukis37 Posted August 9, 2012 Author Share Posted August 9, 2012 Yes, but I use it in .map Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now