get the txd file of the model and then get the dff file of the model and the col of the model (i dont think you realy need to get the col file of the model)
then make a resource
put your files in the resource and add them in the meta.xml
etc:
```<meta>
<script src="client.lua" type="client" />
<file src="your_dff_file_name.dff" />
<file src="your_txd_file_name.txd" />
</meta> ```
then make the client file and paste this into it
function onClientResourceStartReplaceModels()
local modelsToReplace = {
{ -- replace object (all object IDs here: https://dev.prineside.com/en/gtasa_samp_model_id/)
colFile = "your_col_file_name.col", -- if there is not col file then delete this part
txdFile = "your_txd_file_name.txd",
dffFile = "your_dff_file_name.dff",
modelID = 1337, -- go to the map editor or try to get the tree model id
alphaTransparency = false,
filteringEnabled = true,
}
}
for assetID = 1, #modelsToReplace do
local modelData = modelsToReplace[assetID]
local modelCol = modelData.colFile
local modelTxd = modelData.txdFile
local modelDff = modelData.dffFile
local modelID = modelData.modelID
if (modelCol) then
local colData = engineLoadCOL(modelCol)
if (colData) then
engineReplaceCOL(colData, modelID)
end
end
if (modelTxd) then
local filteringEnabled = modelData.filteringEnabled
local txdData = engineLoadTXD(modelTxd, filteringEnabled)
if (txdData) then
engineImportTXD(txdData, modelID)
end
end
if (modelDff) then
local dffData = engineLoadDFF(modelDff)
if (dffData) then
local alphaTransparency = modelData.alphaTransparency
engineReplaceModel(dffData, modelID, alphaTransparency)
end
end
end
end
addEventHandler("onClientResourceStart", resourceRoot, onClientResourceStartReplaceModels)
read this script then past it and thats it i think this should work