Jokeℝ1472771893 Posted May 17, 2012 Share Posted May 17, 2012 pleas help how to replace weapons in MTA:SA and i don't need this engineReplaceModel Link to comment
Castillo Posted May 17, 2012 Share Posted May 17, 2012 engineLoadTXD engineImportTXD engineLoadDFF engineReplaceModel Link to comment
Jokeℝ1472771893 Posted May 17, 2012 Author Share Posted May 17, 2012 engineLoadTXD engineImportTXD engineLoadDFF engineReplaceModel lol i say don't need this :) :) ok thnx Link to comment
Jokeℝ1472771893 Posted May 17, 2012 Author Share Posted May 17, 2012 but please give me simple script to replace weapons Link to comment
Jokeℝ1472771893 Posted May 17, 2012 Author Share Posted May 17, 2012 function ReplaceWeapon ( ) txd = engineLoadTXD ( "m4.txd" ) engineImportTXD ( txd, 31 ) dff = engineLoadDFF ( "m4.dff", 31 ) engineReplaceModel ( dff, 31 ) end addEvent ( "replaceWeapon", true ) addEventHandler ( "replaceWeapon", getRootElement(), ReplaceWeapon ) This is right? Link to comment
myonlake Posted May 17, 2012 Share Posted May 17, 2012 No. You must put the weapon's world object ID into the object part which can be found from Map Editor by searching for "M4" or "Colt" or so. I also prefer this: addEventHandler("onClientResourceStart", resourceRoot, function() -- code end ) Or just leave the event off and only put the functions in the file, works. Link to comment
Jokeℝ1472771893 Posted May 17, 2012 Author Share Posted May 17, 2012 No.You must put the weapon's world object ID into the object part which can be found from Map Editor by searching for "M4" or "Colt" or so. I also prefer this: addEventHandler("onClientResourceStart", resourceRoot, function() -- code end ) Or just leave the event off and only put the functions in the file, works. thnx dude you know Armor ID to replace? Link to comment
Stanley Sathler Posted May 17, 2012 Share Posted May 17, 2012 JokeR, - You know how to program in Lua? I guess not. - You know the MTA Wiki? I guess not. Solidsnake sent to you the functions. Why don't you read the Wiki and learn how to use the functions? Did you know that you can find the Weapon ID's on MTA Wiki? We will not program for you. We will not work for you. If you want make something, go learn Lua. Is the better way. Link to comment
Jokeℝ1472771893 Posted May 18, 2012 Author Share Posted May 18, 2012 JokeR,- You know how to program in Lua? I guess not. - You know the MTA Wiki? I guess not. Solidsnake sent to you the functions. Why don't you read the Wiki and learn how to use the functions? Did you know that you can find the Weapon ID's on MTA Wiki? We will not program for you. We will not work for you. If you want make something, go learn Lua. Is the better way. I say i do it but don't know ID of ammo and can't find in wiki Link to comment
Noki Posted October 30, 2013 Share Posted October 30, 2013 function applyMods() local skin = engineLoadTXD("m4.txd", true) engineImportTXD(skin, 356) local skin = engineLoadDFF("m4.dff", 356) engineReplaceModel(skin, 356) end addEventHandler("onClientResourceStart", resourceRoot, applyMods) <meta> <script src="scriptname.lua" /> </meta> Sorry for bumping an old topic, but I guess the guy seemed desperate and needed help. Link to comment
myonlake Posted October 30, 2013 Share Posted October 30, 2013 Bumping over a year old topic for a small few lines of code is unnecessary. In fact, you can find that code in the Wiki and I know there are 100 other topics about how to import a custom texture on a weapon. 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