dragonofdark Posted January 8, 2011 Share Posted January 8, 2011 (edited) Hello, In my server we are working on some factions and we would like to change the billboards textures. So I took exemple on "thevillage" map. - I search the billboards in the map editor, I took their ID's (4238 and 4729). - I search with IMG tool the textures. (billbrd01_lan and billbrd01_lan2) then I extract them to my deskop. - I open the txd's with TXD workshop, I modify and I save. - I make the directory "textures" in my map directory, I put the 2 TXD's in it. - I modify my meta.xml and add these lines : <file src="textures/billbrd01_lan.txd" /> <file src="textures/billbrd01_lan2.txd" /> <script src="textures.lua" type="client" /> - I create a textures.lua in my map directory. In it there are these lines : function replaceTXD() txd = engineLoadTXD("textures/billbrd01_lan.txd") engineImportTXD(txd, 4238) txd = engineLoadTXD("textures/billbrd01_lan2.txd") engineImportTXD(txd, 4729) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceTXD) I restart the server... But nothing is modified... Can anyone help me ? Thanks in advance, dragonofdark Edited January 8, 2011 by Guest Link to comment
SDK Posted January 8, 2011 Share Posted January 8, 2011 Using files in directory's can be quite tricky sometimes, try this (notice the backslashes): meta.xml <file src="textures\billbrd01_lan.txd" /> <file src="textures\billbrd01_lan2.txd" /> <script src="textures.lua" type="client" /> textures.lua function replaceTXD() txd = engineLoadTXD("textures\\billbrd01_lan.txd") engineImportTXD(txd, 4238) txd = engineLoadTXD("textures\\billbrd01_lan2.txd") engineImportTXD(txd, 4729) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceTXD) Link to comment
dragonofdark Posted January 8, 2011 Author Share Posted January 8, 2011 Thanks ! It works very well ! 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