WASSIm. Posted October 8, 2013 Share Posted October 8, 2013 hi guys i have problem with engineLoadTXD and engineLoadDFF. is show me this Load error @ 'engineLoadTXD [unable to load 'weapon/sniper.txd'] Load error @ 'engineLoadDFF [unable to load 'weapon/sniper.dff'] Link to comment
iPrestege Posted October 8, 2013 Share Posted October 8, 2013 I guess there's error with the txd,dff file's try to use another one. Link to comment
WASSIm. Posted October 8, 2013 Author Share Posted October 8, 2013 I guess there's error with the txd,dff file's try to use another one. but no one file working Link to comment
iPrestege Posted October 8, 2013 Share Posted October 8, 2013 Maybe it's crashed or something? Link to comment
WASSIm. Posted October 8, 2013 Author Share Posted October 8, 2013 Maybe it's crashed or something? no. old its show that debug but working and my new function not working function engineLoadModel ( theFileTXD, theFileDFF, ID, enable ) local enable if enable == nil then enable = true end if ( enable ) then if ( theFileTXD ) then if not fileExists ( theFileTXD ) then local txd = engineLoadTXD(theFileTXD..".txd", true) if ( txd ) then engineImportTXD(txd, ID) end end end if ( theFileDFF ) then if not fileExists ( theFileDFF ) then local dff = engineLoadDFF(theFileDFF..".dff", ID) if ( dff ) then engineReplaceModel(dff, ID) end end end end end --in other script exports["export"]:engineLoadModel ("weapon/sniper","weapon/sniper", 358) Link to comment
-.Paradox.- Posted October 9, 2013 Share Posted October 9, 2013 I makes it by another way I didn't noticed the error in you're script but try this just change weapon name and location local weapons = {{fileName='weapon', model=34},} function load() for index, weapon in pairs(weapons) do tex = engineLoadTXD ( ''..weapon.fileName.. '.txd', weapon.model ) engineImportTXD ( tex, weapon.model ) mod = engineLoadDFF ( ''..weapon.fileName.. '.dff', weapon.model ) engineReplaceModel ( mod, weapon.model ) end end addEventHandler('onClientResourceStart',resourceRoot, function () setTimer ( load, 5000, 1) end) 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