Norhy Posted March 16, 2012 Share Posted March 16, 2012 Hi, when i replace some weapons with other models, they don't replace. It always only replace the M4 model. Here's M4 script: function replaceWeapon ( ) txd = engineLoadTXD ( "weapons/m4.txd" ) engineImportTXD ( txd, 356 ) dff = engineLoadDFF ( "weapons/M4.dff", 356 ) engineReplaceModel ( dff, 356 ) end addEventHandler ( "onClientResourceStart", resourceRoot, replaceWeapon ) And here's a Desert Eagle script: function replaceWeapon ( ) txd = engineLoadTXD ( "weapons/desert_eagle.txd" ) engineImportTXD ( txd, 24 ) dff = engineLoadDFF ( "weapons/desert_eagle.dff", 24 ) engineReplaceModel ( dff, 24 ) end addEventHandler ( "onClientResourceStart", resourceRoot, replaceWeapon ) I make them once, so i make 1 lua file, save it, and again. They are all in a File together with the model replacements. Link to comment
Kenix Posted March 16, 2012 Share Posted March 16, 2012 Hi, when i replace some weapons with other models, they don't replace. It always only replace the M4 model. Here's M4 script: function replaceWeapon ( ) txd = engineLoadTXD ( "weapons/m4.txd" ) engineImportTXD ( txd, 356 ) dff = engineLoadDFF ( "weapons/M4.dff", 356 ) engineReplaceModel ( dff, 356 ) end addEventHandler ( "onClientResourceStart", resourceRoot, replaceWeapon ) And here's a Desert Eagle script: function replaceWeapon ( ) txd = engineLoadTXD ( "weapons/desert_eagle.txd" ) engineImportTXD ( txd, 24 ) dff = engineLoadDFF ( "weapons/desert_eagle.dff", 24 ) engineReplaceModel ( dff, 24 ) end addEventHandler ( "onClientResourceStart", resourceRoot, replaceWeapon ) I make them once, so i make 1 lua file, save it, and again. They are all in a File together with the model replacements. You need use model id, not weapon id. You can see here https://wiki.multitheftauto.com/wiki/Weapons ( in column Model ID ) 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