MavisBey4807 Posted Tuesday at 14:11 Share Posted Tuesday at 14:11 I cant apply any texture to this id. I tried other "WORKING" textures from my other scripts. And nothing changes just original textures. Not blank white texture. here is my client.lua dff = engineLoadDFF ( "hamam.dff" ) engineReplaceModel ( dff, 17517 ) txd = engineLoadTXD ( "hamam.txd" ) engineImportTXD ( txd, 17517 ) here is my meta.xml <meta> <info author='MavisBey' name='MavisBey4807' /> <script src='client.lua' type='client' /> <file src="hamam.dff" /> <file src="hamam.txd" /> </meta> Link to comment
Other Languages Moderators Nico834 Posted yesterday at 00:06 Other Languages Moderators Share Posted yesterday at 00:06 From your code, it looks like the texture (TXD) is being loaded after the model (DFF), which might be why it's not applying correctly. The correct order is to load the texture first, then the model. Here's a working example: local MODEL = 17517 addEventHandler("onClientResourceStart", resourceRoot, function() local texture = engineLoadTXD("example.txd") if not texture then return end engineImportTXD(texture, MODEL) local model = engineLoadDFF("example.dff") if not model then return end engineReplaceModel(model, MODEL) end ) meta.xml: <meta> <script src="client.lua" type="client" /> <file src="example.txd" /> <file src="example.dff" /> </meta> Link to comment
MavisBey4807 Posted 20 hours ago Author Share Posted 20 hours ago 7 hours ago, Nico834 said: From your code, it looks like the texture (TXD) is being loaded after the model (DFF), which might be why it's not applying correctly. The correct order is to load the texture first, then the model. Here's a working example: local MODEL = 17517 addEventHandler("onClientResourceStart", resourceRoot, function() local texture = engineLoadTXD("example.txd") if not texture then return end engineImportTXD(texture, MODEL) local model = engineLoadDFF("example.dff") if not model then return end engineReplaceModel(model, MODEL) end ) meta.xml: <meta> <script src="client.lua" type="client" /> <file src="example.txd" /> <file src="example.dff" /> </meta> i tried it but still nothing changed. https://ibb.co/sByvTDD https://ibb.co/35W0ZSJx Link to comment
Other Languages Moderators Nico834 Posted 12 hours ago Other Languages Moderators Share Posted 12 hours ago Now that you've shared the contents of your TXD file, it's clear why you're not seeing any difference. The 17517 ID is linked to templae2land.txd, and the chipboard_256128 texture is exactly the same. So even though you're replacing it in the script, you're still applying the same texture. 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