Jump to content

Adding texture to a mod skin


Karim02

Recommended Posts

  • MTA Anti-Cheat Team

Server mods overrule any client GTA mods, and yes it will be visible server-wide for all players if you use these functions;

https://wiki.multitheftauto.com/wiki/EngineImportTXD

https://wiki.multitheftauto.com/wiki/EngineLoadTXD

https://wiki.multitheftauto.com/wiki/EngineLoadDFF

The resource you're talking about, Modloader (https://community.multitheftauto.com/index.php?p=resources&s=details&id=3016) uses them, so the mods will be applied for all players, just like if you used a simple skin replacement script using those functions;

addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource() ),
	function ()
		txd = engineLoadTXD ( "skinmodel.txd" ); -- change 'skinmodel' to your mod's file name
		engineImportTXD ( txd, 190 ); -- change the ID 190 into the GTA skin ID you with to replace with mod
		dff = engineLoadDFF ( "skinmodel.dff", 190 ); -- change 'skinmodel' to your mod's file name
		engineReplaceModel ( dff, 190 ); -- change the ID 190 into the GTA skin ID you with to replace with mod
	end
);

Just to say, you don't need to use Modloader to achieve it.

11 hours ago, Karim02 said:

 can I use custom textures on the mod skin?

Mods typically consist of textures (the TXD file besides the DFF) so just loading it like above (the TXD file supplied with said mod) should cut it. But if you mean only using modded textures, yes you can create a modded skin that just needs to load the TXD (textures) because it remains compatible with the original DFF. That can be as simple as exporting the default TXD for a GTA skin, and then changing the image files in it, to say turn a character's clothing into a different color, etc, and just loading the TXD.

Link to comment

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...