beko1studio Posted August 11, 2023 Share Posted August 11, 2023 Hello Guys, I want to ask an question for you. I am modelling an build with 3DSMAX. I added a window with Alpha value (its doesn't includes any textures, just color) but when export that model I can't see all the objects like in the picture. I researched all methods but anyone didn't work. (Replacing FLAG ID'S, maybe I can't use alphaTransparency in lua) Please can someone help me, thank you... https://imgur.com/a/VuM5iCL My export settings, (Glas is a one object, seperated not in a object complately) https://imgur.com/a/W1wphZK Link to comment
beko1studio Posted August 11, 2023 Author Share Posted August 11, 2023 UPDATE Hello, I solved it with that code If you have to that problem you can use that code. You need open a new lua file (example.lua) and rename with your object files (Object.col, Object.dff, Object.txd and your model ID) your problem will solve like this ; https://imgur.com/a/c2KZf60 Thanks guys... Have a nice day function onClientResourceStartReplaceModels() local modelsToReplace = { { -- replace object colFile = "Object.col", txdFile = "Object.txd", dffFile = "Object.dff", modelID = 5427, alphaTransparency = true, 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) 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