Simulate Posted June 20, 2010 Share Posted June 20, 2010 Hi there! Can somebody give me the code how to replace a skins ddf/ttf? I made one but it doesnt works, i used the car replace script and replaced car for skin but that doesnt work So if somebody can give that script im really happy! Sorry for bad english im dutch! Greetings, Simulate Link to comment
dzek (varez) Posted June 20, 2010 Share Posted June 20, 2010 you cant replace MODEL you can replace TEXTURE download zombie script, and check the code ddf/ttf ddf -> dff ttf -> txd (TTF - True Type Font ) Link to comment
TheRealCow Posted June 21, 2010 Share Posted June 21, 2010 function replaceModel() local skin = engineLoadTXD ( "skins/13.txd" ) engineImportTXD ( skin, 13 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) Link to comment
LonelyRoad Posted June 21, 2010 Share Posted June 21, 2010 Perfect so far as I can see. Link to comment
Simulate Posted June 24, 2010 Author Share Posted June 24, 2010 function replaceModel() local skin = engineLoadTXD ( "skins/13.txd" ) engineImportTXD ( skin, 13 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) THANKS Link to comment
Castillo Posted June 28, 2010 Share Posted June 28, 2010 Why we can't change Model? Not supported in mta if im right Link to comment
darkraid Posted July 7, 2010 Share Posted July 7, 2010 Thats a client script right? do I need to add a server script with a triggerClientEvent? Link to comment
MaddDogg Posted July 7, 2010 Share Posted July 7, 2010 do I need to add a server script with a triggerClientEvent? No, why would you? You don't want to change the skin for the server, you want to change it for the client. The replace function gets called for every player, when the resource is started for him. Link to comment
darkraid Posted July 8, 2010 Share Posted July 8, 2010 Alright, I added this script I also changed it to look like this: function replaceModel() local skin = engineLoadTXD ( "skins/80.txd" ) engineImportTXD ( skin, 80 ) local skin = engineLoadTXD ( "skins/81.txd" ) engineImportTXD ( skin, 81 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) but when I start the resource then connect to the server, it downloads a file so it must be the two modded skins, I then select the team but it shows the original skins and not the modified ones? any help much appreciated. Link to comment
TheRealCow Posted July 8, 2010 Share Posted July 8, 2010 function replaceModel() local skin = engineLoadTXD ( "skins/80.txd" ) engineImportTXD ( skin, 80 ) local skin2 = engineLoadTXD ( "skins/81.txd" ) engineImportTXD ( skin2, 81 .end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) Link to comment
DiSaMe Posted July 8, 2010 Share Posted July 8, 2010 Make sure that the path to the files is correct. Link to comment
darkraid Posted July 8, 2010 Share Posted July 8, 2010 I have used the changed script posted above. The path's are correct. The skins get downloaded they show up in the following directory, .../MTA San Andreas/mods/deathmatch/resources/skin_replacer but the skins don't show up in game? it is still the original. Do I need to change something in the settings of basemode? or something? Thanks! Link to comment
TheRealCow Posted July 8, 2010 Share Posted July 8, 2010 Alright, I added this script I also changed it to look like this: function replaceModel() local[color=#FF0000] skin [/color]= engineLoadTXD ( "skins/80.txd" ) engineImportTXD ( skin, 80 ) local [color=#FF0000]skin[/color] = engineLoadTXD ( "skins/81.txd" ) engineImportTXD ( skin, 81 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) but when I start the resource then connect to the server, it downloads a file so it must be the two modded skins, I then select the team but it shows the original skins and not the modified ones? any help much appreciated. they are named same.. look at my earlyer post Link to comment
darkraid Posted July 8, 2010 Share Posted July 8, 2010 I used the code you posted in your post. It still doesn't use the skins in game? Link to comment
DiSaMe Posted July 8, 2010 Share Posted July 8, 2010 Alright, I added this script I also changed it to look like this: function replaceModel() local[color=#FF0000] skin [/color]= engineLoadTXD ( "skins/80.txd" ) engineImportTXD ( skin, 80 ) local [color=#FF0000]skin[/color] = engineLoadTXD ( "skins/81.txd" ) engineImportTXD ( skin, 81 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) but when I start the resource then connect to the server, it downloads a file so it must be the two modded skins, I then select the team but it shows the original skins and not the modified ones? any help much appreciated. they are named same.. look at my earlyer post They aren't named same. They only use variables which are named the same. Second texture is loaded after the first has already been imported, so it's not the problem. Link to comment
darkraid Posted July 8, 2010 Share Posted July 8, 2010 so do i use the one with skin and skin or skin and skin2? both seem to be working to download the skins to the local mod folder. BUT the skins are not working in the game? they are in the local mods folder so something to do with basemode cant be configured correctly? in the meta for basemode its set to use skin numbers 80 and 81. Link to comment
50p Posted July 8, 2010 Share Posted July 8, 2010 Alright, I added this script I also changed it to look like this: function replaceModel() local[color=#FF0000] skin [/color]= engineLoadTXD ( "skins/80.txd" ) engineImportTXD ( skin, 80 ) local [color=#FF0000]skin[/color] = engineLoadTXD ( "skins/81.txd" ) engineImportTXD ( skin, 81 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) but when I start the resource then connect to the server, it downloads a file so it must be the two modded skins, I then select the team but it shows the original skins and not the modified ones? any help much appreciated. they are named same.. look at my earlyer post It doesn't matter in this case... @darkraid, the problem is the path to the files. You said, The skins get downloaded they show up in the following directory, .../MTA San Andreas/mods/deathmatch/resources/skin_replacer skin_replacer is the resource root folder but you try to load a file from ".../resources/skin_replacer/skins/80.txd" which is completely wrong... WHY DON'T YOU LEARN TO DEBUG? Link to comment
darkraid Posted July 9, 2010 Share Posted July 9, 2010 @darkraid, the problem is the path to the files. You said,The skins get downloaded they show up in the following directory, .../MTA San Andreas/mods/deathmatch/resources/skin_replacer skin_replacer is the resource root folder but you try to load a file from ".../resources/skin_replacer/skins/80.txd" which is completely wrong... WHY DON'T YOU LEARN TO DEBUG? -.- i'm not the one that made this script up. in that quote i was talking about the LOCAL mod folder which the resources get downloaded to. so the script must be working fine because its doing what it was designed to do which is replace the skins. BUT the custom skins DO NOT show up in basemode they are still the original. How do i make it so it uses the custom skins? Link to comment
50p Posted July 9, 2010 Share Posted July 9, 2010 @darkraid, the problem is the path to the files. You said,The skins get downloaded they show up in the following directory, .../MTA San Andreas/mods/deathmatch/resources/skin_replacer skin_replacer is the resource root folder but you try to load a file from ".../resources/skin_replacer/skins/80.txd" which is completely wrong... WHY DON'T YOU LEARN TO DEBUG? -.- i'm not the one that made this script up. in that quote i was talking about the LOCAL mod folder which the resources get downloaded to. so the script must be working fine because its doing what it was designed to do which is replace the skins. BUT the custom skins DO NOT show up in basemode they are still the original. How do i make it so it uses the custom skins? And what I'm saying is that it doesn't point to the texture file. The LOCAL mod can have more folders inside... You need to learn more about MTA resources and meta.xml. Check my signature for the link to meta.xml. Link to comment
darkraid Posted July 9, 2010 Share Posted July 9, 2010 And what I'm saying is that it doesn't point to the texture file. The LOCAL mod can have more folders inside... You need to learn more about MTA resources and meta.xml. Check my signature for the link to meta.xml. If your talking about have the file src in the meta, its in there. Link to comment
50p Posted July 9, 2010 Share Posted July 9, 2010 And what did you set for src attribute? And where is the file located (server resource)? Link to comment
darkraid Posted July 9, 2010 Share Posted July 9, 2010 And what did you set for src attribute? And where is the file located (server resource)? The meta is as follows: <meta> <info name="Skin replace" author="darkraid" version="1.0.0" type="script" /> <script src="Skins.lua" type="client" /> <file src="skins/80.txd" /> <file src="skins/81.txd" /> </meta> The resource is located in the server resource correct. (server > mods > deathmatch > resources > skin_replacer) Link to comment
50p Posted July 9, 2010 Share Posted July 9, 2010 Do you have skins folder in the resource? Link to comment
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