Jump to content

Skin


Norhy

Recommended Posts

Posted

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)

Posted (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 by Guest

CDW6v.png

74283457.jpg

Posted

Hello, not sure if you're new around here, but welcome anyways.

First I'd like to show you these functions.

engineReplaceModel 
engineLoadTXD 
engineLoadDFF 

If I helped you, please click the like button on the right ;) Thanks!

Posted

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.

Posted

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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...