Norhy Posted March 15, 2012 Posted March 15, 2012 Hi. I have Questions. Again two. • 1. How to replace a ped skin with a LUA Code? (Idk the code), my skin names are stormtrooper.dff and stormtrooper.txd • 2. How to replace a weapon model with a LUA Code? (Idk the code)
-RoCk-Alex Posted March 15, 2012 Posted March 15, 2012 (edited) addEventHandler("onClientResourceStart", getRootElement(), function (rsc) if (rsc == getThisResource()) then SkinTXD = engineLoadTXD ("stormtrooper.txd"); engineImportTXD (SkinTXD, 1); SkinDFF = engineLoadDFF ("stormtrooper.dff", 1); engineReplaceModel (SkinDFF, 1); end; end); this will replce The Truth's skin for skin id go:- http://wiki.sa-mp.com/wiki/Skins:All Edited March 15, 2012 by Guest
Castillo Posted March 15, 2012 Posted March 15, 2012 You must use the Engine functions: https://wiki.multitheftauto.com/wiki/Cli ... _functions @-RoCk-Alex: Your script has syntax errors.
myonlake Posted March 15, 2012 Posted March 15, 2012 Hello, not sure if you're new around here, but welcome anyways. First I'd like to show you these functions. engineReplaceModel engineLoadTXD engineLoadDFF
Norhy Posted March 15, 2012 Author Posted March 15, 2012 Castillo, look at this. I get no errors, and the message i typed appears everytime, but the Skin doesn't load. My script: outputChatBox ( "> replacing the Carl Johnson skin with the Stormtrooper skin" ) txd = engineLoadTXD ( "stormtrooper.txd" ) engineImportTXD ( txd, 0 ) dff = engineLoadDFF ( "stormtrooper.dff", 0 ) engineReplaceModel ( dff, 0 ) Here's my meta.xml: type">type="script" name="Messages" author="Ahoj" version="1"> Name of the skins are stormtrooper.txd and stormtrooper.dff, both are placed in the "trooper" file.
Castillo Posted March 15, 2012 Posted March 15, 2012 As far as I know, you can't replace CJ skin, try with a different model. Also, you're using a wrong file location. outputChatBox ( "> replacing the Carl Johnson skin with the Stormtrooper skin" ) txd = engineLoadTXD ( "trooper/stormtrooper.txd" ) engineImportTXD ( txd, 0 ) dff = engineLoadDFF ( "trooper/stormtrooper.dff", 0 ) engineReplaceModel ( dff, 0 )
-RoCk-Alex Posted March 15, 2012 Posted March 15, 2012 lol i never tried to replace Cj's skin but for example i did it but Code Updated LOL you leached me new thing SolidSnake
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