Jump to content

[Tutorial] Test Skin Shader In Local Server


Liyones

Recommended Posts

Hello Community & Welcome, In this tutorial i will show you how to test your skin shader in a local server.


Tools needed:



STEP 1: Exporting & Replacing The Shader


First of all make sure you have the skin shader saved in your pc, if not then open TXDworkshop.
alt text


click "open IMG"
alt text


And now look for GTA SA folder and open gta3.img which is located here:
C:\Program Files (x86)\Grand Theft Auto San Andreas\models
alt text


once you open it a bunch of txd and dff files will appear in the list, all you have to do is search for the skin you're looking for in the search bar, be sure that MTA closed or the gta3.img file won't load.
alt text


To find the skin texture/model name you can check MTA skins Page


Okay once you open gta.img now click on the search bar and type the skin name which you found in MTA skins page, we will use TRIADA as example, so when you find the skin file that end with .txd click on it, an error will appear just ignore it and click ok.
alt text


Now simply click on "Export" button and choose PNG or TGA, if you want to test it using dff viewer then you should export it as TGA but since we will test it on MTA you can export it as PNG or TGA, then choose desktop or where you want to export it.
alt text


So i just showed you how to export a skin shader that you want to edit, now if you want to test it open the TXDworkshop again and look for the skin as i showed, and instead of exporting it to TGA or PNG just export it to TXD but the TXD option doesn't show? So all you have to do is right click on "name.txd" which is the texture file and then click on "export" and choose where you want to export it.
alt text


Now simply go where you exported it and open the txd file, to open the file you will need MagicTXD program downloaded in your pc which i shared before, now once you open the file the texture will appear.
alt text


Now all you have to do is replace the original texture with the texture you designed.
So the first step click on edit.
alt text


A list will appear, click on replace and then just locate your shader and select it.
alt text


Now a panel will appear, don't touch anything and just click on "replace" and then save the txd file with ctrl + s or click
alt text


STEP 2: Testing The Skin Shader


Now in this step we will test the skin shader ingame but first we need a script that load the TXD so all you have to do is make a folder inside server resource which is located here:
C:\Program Files (x86)\MTA San Andreas 1.5\server\mods\deathmatch\resources
once you create the folder just make 2 files inside it which are "meta.xml" and "client.lua" and put the txd file inside the folder.
alt text


Okay now open meta.xml file which we created using any editor you have, i use Visual Studio Code.
alt text


Now copy this code and paste it in the meta.xml:


<meta>
<script src="client.lua" type="client"/>
<file src="triada.txd" type="server"/>
</meta>

Replace the "triada.txd" with your txd file name or the shader won't load ingame and just save the code using ctrl + s or File>Save.


Now open client.lua file and paste this code there:


function skin()     
txd = engineLoadTXD("triada.txd", 117)
engineImportTXD(txd, 117)
end
addEventHandler("onClientResourceStart", resourceRoot, skin)

Well actually you should edit this file if you change the skin or something or if you willing to test another skin, just replace the "triada.txd" with your txd file name and replace the ID which is "117" with the skin ID you want to test which you can find here and then save the file.


I guess we just finished replacing the skin shader and writing the script, now run your MTA server which is located here:
C:\Program Files (x86)\MTA San Andreas 1.5\server and run MTA Server.exe file
alt text


Once you run it a cmd or something like that will appear.
alt text


Now join the game and join the local server, for those who don't know how to join just click on Local and you will find the server, if you didn't find it just click on "connect" button and you will connect to it.
alt text


Well to test the shader you will need admin access and since it will take longer to make a tutorial for how to add yourself as admin you can watch this video it can help you, and after you add yourself to admin group just restart the server and you will get admin panel.
https://youtu.be/Te2SZUnTWrs


after you add yourself as admin and you restart the server just login again with /login <username> <password> and it will tell you to click p to open the panel.


Now just open the admin panel by clicking p and go to "players" section then click on your name and click "set skin".
alt text


Then a skins panel will appear, just paste the skin ID and click on "select".
alt text


Now all you have to do is just start the script, so just type /start <scriptname> in chat example "/start skin" because i named the script folder as "skin" or just go to "resources" section on admin panel and search for the script folder name and click on "start", if you couldn't find the script or it says the resource doesn't exist just go to console and type /refresh and try again.
Once you start the script your shader will load.


alt text


Hope you all liked the tutorial and hope it was clean and useful, if there was some part missing feel free to tell me on discord or reply and if anyone have some problem or need help with testing skins or something feel free to contact me via discord Liyones#7896


Cheers.


Link to comment
Share on other sites

  • 3 weeks later...

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
×
×
  • Create New...