diegofkda Posted September 12, 2011 Share Posted September 12, 2011 Well, I want to change the collisions of some cars (using embedded collisions), this is what the wiki says for that: Note: Due to a bug, when replacing models with built in collisions (i.e. vehicles), the collision may not get replaced correctly. The current work around is to load the dff again and do another replace after a short delay. And my script is this one: vehiclesToReplace = {"huntley", "comet", "elegant", "bullet", "bravura", "cadrona", "jester", "esperanto", "stallion", "zr-350", "flash"} function replaceModels() for name, value in ipairs ( vehiclesToReplace ) do txd = engineLoadTXD ( value..".txd" ) engineImportTXD ( txd, getVehicleModelFromName ( tostring(value) ) ) dff = engineLoadDFF ( value..".dff", getVehicleModelFromName ( tostring(value) ) ) engineReplaceModel ( dff, getVehicleModelFromName ( tostring(value) ) ) dff1 = engineLoadDFF ( value..".dff", getVehicleModelFromName ( tostring(value) ) ) engineReplaceModel ( dff1, getVehicleModelFromName ( tostring(value) ) ) end end addEventHandler ( "onClientResourceStart", resourceRoot, replaceModels ) The DFF gets replaced correctly while the collision not, what should I do if I'm following wiki steps?. Link to comment
#Paper Posted September 13, 2011 Share Posted September 13, 2011 engineReplaceCOL engineLoadCOL Use that functions ^^ Link to comment
diegofkda Posted September 13, 2011 Author Share Posted September 13, 2011 Meh, that function isn't compatible with vehicles, only with objects. Anyway, I fixed the problem and the example has been added to the wiki. 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