Jump to content

Texture replacement problem


Cyber14

Recommended Posts

Hi, Im trying to import some objects from GTA IV to my MTA Server. I watched some videos and in result I made dff, col and txd file. When I uploaded it to my server the object model was exactly like I want it to be. The collision was working fine too, but the object texture was blank - it looks like the same with the txd file teplaced and without the txd file replaced, so I think that the problem is with this file. I was trying to find a solution but it didnt give an effect. For better clarity I'm explaining how I add an material to the object.

https://imgur.com/a/laikQkp - Please read the descriptions of the images, start reading from the bottom of the page.

Please help me and dont know what am I doing wrong.

Link to comment
8 minutes ago, TEDERIs said:

Hi,

the function engineImportTXD should be called before loading the DFF. It's important to call the engine functions in certain order.

I changed the order to look like this:

 

addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource() ), function ()
	txd = engineLoadTXD ( "cam.txd" )
	if (engineImportTXD ( txd, 1237 )) then
		outputChatBox ( "TXD => TRUE")
	else
		outputChatBox ( "TXD => FALSE")
	end
	
	dff = engineLoadDFF ( "cam.dff" )
	if(engineReplaceModel ( dff, 1237 )) then
		outputChatBox ( "DFF => TRUE")
	else
		outputChatBox ( "DFF => FALSE")
	end
	
	col = engineLoadCOL( "cam.col" )
	if(engineReplaceCOL( col, 1237 )) then
		outputChatBox ( "COL => TRUE")
	else
		outputChatBox ( "COL => FALSE")
	end
end)

 

But now the camera object is black:

PzuVclv.jpg

Without the TXD replace function it's white as I show at beginning.

Edited by Cyber14
Link to comment

What you should do is select a default material, change it's type to GTA Material (by pressing the button next to the material name which says "Standard"), then click on the button on the right of color column which will by default say "None", and then select a bitmap texture. Then you need to rename the map from "Map #1" to the same as the texture name but excluding the file extension (not sure if this is required but I always do that). 

Link to comment
11 minutes ago, MrTasty said:

What you should do is select a default material, change it's type to GTA Material (by pressing the button next to the material name which says "Standard"), then click on the button on the right of color column which will by default say "None", and then select a bitmap texture. Then you need to rename the map from "Map #1" to the same as the texture name but excluding the file extension (not sure if this is required but I always do that). 

I did it and its still black.

UlrBrSU.png

@TEDERIs I have uploaded the another TXD file which (0,0) point was blue and the camera was still black.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...