SonicTHedgehog Posted July 8, 2011 Posted July 8, 2011 function ( "> replacing the shotg weapon" ) txd = engineLoadTXD ( "data/shotg.txd" ) engineImportTXD ( txd, 22 ) end whats wrong with it ?? i want to replace any weapon ( because i dont know the weapons ID ) i choosed 22 and i think its m4 with my txd shotg whats wrong with it ? its not working and if its wrong .. i am still new in scripting.
Castillo Posted July 8, 2011 Posted July 8, 2011 function replaceFunction( ) txd = engineLoadTXD ( "data/shotg.txd" ) engineImportTXD ( txd, 22 ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),replaceFunction) In your meta.xml you must have the right data "data/shotg.txd".
SonicTHedgehog Posted July 8, 2011 Author Posted July 8, 2011 Still not working .. now what about the meta.xml is it wrong ? <meta> <info author="SonicTheHedgehog" type="Weapon" name="ShotG" /> <script src="shotg.lua" type="client" /> <file src="data/shotg.TXD" type="client" /> </meta>
Castillo Posted July 8, 2011 Posted July 8, 2011 22 = Colt 45, just give the weapon press P (for admin panel) and check the ID.
GodFather Posted July 8, 2011 Posted July 8, 2011 Here is all weapons ids. https://wiki.multitheftauto.com/wiki/Weapons
SonicTHedgehog Posted July 8, 2011 Author Posted July 8, 2011 And is there some thing wrong with the meta.xml ??
SonicTHedgehog Posted July 8, 2011 Author Posted July 8, 2011 This is it ! check it if there is some thing wrong ! shotg.lua function replaceFunction( ) txd = engineLoadTXD ( "data/shotg.txd" ) engineImportTXD ( txd, 22 ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),replaceFunction) meta.xml <meta> <info author="SonicTheHedgehog" type="Weapon" name="ShotG" /> <script src="shotg.lua" type="client" /> <file src="data/shotg.txd" type="client" /> </meta> Lol sorry again
DiSaMe Posted July 8, 2011 Posted July 8, 2011 Model 22 isn't even a weapon. It's a ped. M4 model ID is 356.
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