CIT Forum Index

Support => Tutorials and Guides => General Guides => Topic started by: TheHacker on 26 01, 2018, 03:33:21 am

Title: [TUT] How to test skin shader in MTA:SA 1.5 version
Post by: TheHacker on 26 01, 2018, 03:33:21 am
You can in 1.5 without any problems. Simply create a topic named 'skin' in Desktop. Then create meta.xml with this text:

Code: XML
  1. <meta>
  2.  
  3.         <script src="client.lua" type="client"/>
  4.                 <file src="mod.dff" type="server"/>
  5.                 <file src="mod.txd" type="server"/>
  6.                
  7. </meta>

Here is the client.lua:
Code: Lua
  1. local skinID = 11 --replace "11" with your skin ID
  2.  
  3. function applySkin()    
  4.     txd = engineLoadTXD("mod.txd", skinID)      
  5.     engineImportTXD(txd, skinID)  
  6.     dff = engineLoadDFF("mod.dff", skinID)  
  7.     engineReplaceModel(dff, skinID)      
  8. end
  9. addEventHandler("onClientResourceStart", resourceRoot, applySkin)
  10.  
You can re-place those 11 with skin ID. Then get the skin TXD (Edited one) and DFF and then add both of them in the skin folder.

TXD's name should be this: mod.txd
DFF's name should be this: mod.dff
(you can change them but when you change it, change it from meta.xml as well or else it won't work.

Once it is done, put the 'skin' folder here: C:\Program Files (x86)\MTA San Andreas 1.5\server\mods\deathmatch\resources

Then re-open MTA SA and go to Map Editor. Press 'F5' and then press F8 and type 'start skin' and then wait for it to load (which will take around 2 - 3 seconds only) and then use /ss <skin ID>
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: DesiigneR on 26 01, 2018, 12:06:16 pm
This is a great guide, I always use this method because there’s no need to download 1.3
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: Risk on 26 01, 2018, 12:24:06 pm
Remove 11 from engineLoadTXD and engineLoadDFF. engineLoadDFF has only 1 argument and engineLoadTXD's second argument accepts only booleans(whether to enable texture filtering or not)
And "file" tag doesn't have a 'type' parameter...? They are client-side files anyway

A good and a helpful guide, good job
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: TheHacker on 26 01, 2018, 01:19:44 pm
Remove 11 from engineLoadTXD and engineLoadDFF. engineLoadDFF has only 1 argument and engineLoadTXD's second argument accepts only booleans(whether to enable texture filtering or not)
And "file" tag doesn't have a 'type' parameter...? They are client-side files anyway
What do you mean by that? 11 is the ID. I am not saying to add another argument and it works perfectly anyway. I even said to re-place 11 with skin ID and it will work perfectly.
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: Risk on 26 01, 2018, 02:18:06 pm
What do you mean by that? 11 is the ID. I am not saying to add another argument and it works perfectly anyway. I even said to re-place 11 with skin ID and it will work perfectly.
You use the ID in engineImportTXD and engineReplaceModel. I am only saying it's unnecessary to type the IDs in engineLoadTXD and engineLoadDFF as they don't do anything in these functions.. It won't create problems in running but script looks ugly like that.
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: TheHacker on 26 01, 2018, 03:18:58 pm
You use the ID in engineImportTXD and engineReplaceModel. I am only saying it's unnecessary to type the IDs in engineLoadTXD and engineLoadDFF as they don't do anything in these functions.. It won't create problems in running but script looks ugly like that.
At least it works. We are not going to give it to anyone else though or showing it to them.
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: DroMa on 27 01, 2018, 08:24:13 pm
Quote
start: Resource could not be found
i can't test my skin in MTA 1.5 I followed ur steps  :-\
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: TheHacker on 28 01, 2018, 06:08:31 am
i can't test my skin in MTA 1.5 I followed ur steps  :-\
Did you re-started your MTA? Make sure you did the following steps correctly because I did them and they worked perfectly. Make sure you put the skin folder in correct place which is in C:\Program Files (x86)\MTA San Andreas 1.5\server\mods\deathmatch\resources. Re-start MTA after you put the resources (make you just don't put meta, put meta.xml and not only client, it should be client.lua and when saving the file, save it as UTF-8, only for meta.xml and client.lua and the mod.txd and mod.dff should just be copied from TXD Workshop or if it is a modded skin, get it from this folder: C:\Program Files (x86)\MTA San Andreas 1.5\mods\deathmatch\resources\CITskinMods
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: Relerx on 28 01, 2018, 09:06:37 am
Adding unnecessary things is not needed and is confusing for everyone.... you should change it.

Might as well indent it properly and make it look better.
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: TheHacker on 28 01, 2018, 12:40:11 pm
Maybe this would be better
Code: Lua
  1. local skinID = 11 --replace "11" with your skin ID
  2.  
  3. function applySkin()    
  4.     txd = engineLoadTXD("mod.txd", skinID)      
  5.     engineImportTXD(txd, skinID)  
  6.     dff = engineLoadDFF("mod.dff", skinID)  
  7.     engineReplaceModel(dff, skinID)      
  8. end
  9. addEventHandler("onClientResourceStart", resourceRoot, applySkin)

The player will have to change the skin ID just from the variable up.
Changed, thanks.
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: Relerx on 28 01, 2018, 03:30:50 pm
https://wiki.multitheftauto.com/wiki/EngineLoadTXD

2nd argument is a bool. Not a number.

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

doesn't even have a 2nd argument.

And here is the code because you are literally adding unnecessary now and not willing to fix it:

Code: Lua
  1. local skinID = 11 --replace "11" with your skin ID
  2.  
  3. function applySkin()    
  4.     txd = engineLoadTXD("mod.txd")      
  5.     engineImportTXD(txd, skinID)  
  6.     dff = engineLoadDFF("mod.dff")  
  7.     engineReplaceModel(dff, skinID)      
  8. end
  9. addEventHandler("onClientResourceStart", resourceRoot, applySkin)
  10.  

+

Code: XML
  1. <meta>
  2.         <script src="client.lua" type="client" />
  3.         <file src="mod.dff" />
  4.         <file src="mod.txd" />      
  5. </meta>
  6.  
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: DroMa on 28 01, 2018, 06:19:22 pm
nothing happend I tried everything.
check these screenshots:
Show content
(https://i.imgur.com/uB4N4Zf.png)
(https://i.imgur.com/Ny2cDwV.png)
(https://i.imgur.com/tOeLzvh.png)
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: Risk on 28 01, 2018, 11:05:17 pm
nothing happend I tried everything.
check these screenshots:
Show content
(https://i.imgur.com/uB4N4Zf.png)
(https://i.imgur.com/Ny2cDwV.png)
(https://i.imgur.com/tOeLzvh.png)
Everything looks OK but:
(https://i.imgur.com/drhAqSY.png)
Where on Earth did you get line 2(the highlighted one) from? It doesn't even have a handler function and if you check debug you'd find an error. Remove that line. It isn't even mentioned in the script above.

However, this isn't the problem it doesn't stop the script from running. The resource may not have started because you don't have the permission to start it, make sure you have an account and it's in an ACL group that has permission to start/stop resources. You can search google to find out how to create an admin account on your MTA server.
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: DroMa on 29 01, 2018, 02:14:45 am
That eventhandler I added it recently, after many tries to make it works, but nothing happens, I recive message on f8 saying « skin started » and when I check the skin I see nothing new.
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: Rybo on 29 01, 2018, 04:08:04 am
This method absolutely comes in handy especialy for the rising amount of people that are finding compatibility issues with 1.3 these days, well done my dood. Also, I hope you guys get to finish with the xml as soon as you can else, gj.
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: Risk on 29 01, 2018, 01:28:53 pm
That eventhandler I added it recently, after many tries to make it works, but nothing happens, I recive message on f8 saying « skin started » and when I check the skin I see nothing new.
Just remove that event handler and it will work, it's useless and has an unnecessary comma at the end of it which stops the script from loading and you'd see no skin. Please use '/debugscript 3' in the next time to avoid things like this.
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: DroMa on 29 01, 2018, 02:46:31 pm
nothing happend I tried it before without the eventhandler
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: GoldenFTW on 11 02, 2018, 03:34:05 pm
could you make it as Video explain it more this will be better .
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: guest76597 on 20 03, 2018, 08:39:52 pm
Guys plz can any one send me Vidéo have all details of designer skin and test plz
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: MaZika. on 20 03, 2018, 09:41:51 pm
Guys please can any one send me Vidéo have all details of designer skin and test please
How to test your skin shader in Map Editor check this video
Show content
https://www.youtube.com/watch?v=lr02nQDNGYc

how design skin check this viedo
Show content
https://www.youtube.com/watch?v=2xDjnnIP_q0
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: MaZika. on 21 03, 2018, 11:52:24 am
hmm and me I know alll this but how can I install the dossier and renomer par DDF and TXD how ?

How to use Txd WorkShop For Grand Theft Auto San Andreas

Show content
https://www.youtube.com/watch?v=XPVK_JpMYQM

How To Install TXD workshop
Show content
https://www.youtube.com/watch?v=IObC6vPR7Q4

Viewing Skin using DFF Viewer.
Show content
https://www.youtube.com/watch?v=hPxzhzrmPD4

I hope this helps you
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: R2003 on 01 06, 2019, 09:55:57 am
I think this can help can you make a video so I can understand it clearly?
Title: Re: How to test skin shader in MTA:SA 1.5 version
Post by: Ptole on 01 06, 2019, 12:50:42 pm
I think this can help can you make a video so I can understand it clearly?
@CoMraD can I help you? Where do you face any problems?