denny199 Posted July 2, 2013 Posted July 2, 2013 Hi guys, I don't know if I'm in the good topic but I have a problem with my 3d model. I tried to replace the "vinewood" sign, I gained the dff model from the img file, and then started to edit it. My result was pretty nice, exported it without any problems. In-game I started the script, without luck, no crash at all, but the model didn't loaded my dff file: https://www.dropbox.com/s/rgzcpv3v5brllip/bami.dff My script: function laad() local dff1 = engineLoadDFF("bami.dff", 13831 ) engineReplaceModel(dff1, 13831) outputChatBox ( "start") end addEventHandler("onClientResourceStart", resourceRoot, laad) addCommandHandler ( "laad", laad ) What am I doing wrong? Regards, Danny
Castillo Posted July 2, 2013 Posted July 2, 2013 Any errors on the debugscript? is it set as client side on the meta.xml?
denny199 Posted July 2, 2013 Author Posted July 2, 2013 No errors at all, since everything is working correclty with the script loading. My meta.xml: <meta> <script src="mod.lua" type="client" /> <file src="bami.dff" /> </meta> And it's outputting "start".
denny199 Posted July 2, 2013 Author Posted July 2, 2013 Yes, it is turning white and then returns to the default model.
HunT Posted July 2, 2013 Posted July 2, 2013 getResourceRootElement(getThisResource()) function replaceModel () local dff1 = engineLoadDFF("bami.dff", 13831 ) engineReplaceModel(dff1, 13831) outputChatBox ( "start") -- ? end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel ) addCommandHandler ( "laad", replaceModel )
iPrestege Posted July 2, 2013 Posted July 2, 2013 getResourceRootElement(getThisResource()) function replaceModel () local dff1 = engineLoadDFF("bami.dff", 13831 ) engineReplaceModel(dff1, 13831) outputChatBox ( "start") -- ? end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel ) addCommandHandler ( "laad", replaceModel ) As far as i know resourceRoot = getResourceRootElement(getThisResource())
denny199 Posted July 2, 2013 Author Posted July 2, 2013 Why would you change the code if "start" is outputting, I think it's related to the model.
bandi94 Posted July 4, 2013 Posted July 4, 2013 Still need some help with it. It never happend with me , if you are saying it's not from script then maybe it's something wrong with the dff , and MTA engine is forced to return to the original model. Try to replace it with another dff and see if it work's
denny199 Posted July 4, 2013 Author Posted July 4, 2013 Hmmm, I reconnected and it was loaded, so the problem is fixed thanks guys (maybe it is the new loading system)
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