MatreN Posted August 1, 2020 Share Posted August 1, 2020 Hi guys, I uploaded samp objects to my own mapping server, but they look white. Link to comment
gubi Posted August 1, 2020 Share Posted August 1, 2020 Did you included all .txd files also? Link to comment
MatreN Posted August 1, 2020 Author Share Posted August 1, 2020 4 minutes ago, gubi said: Did you included all .txd files also? no .txd files, only .dff, .col. Link to comment
gubi Posted August 1, 2020 Share Posted August 1, 2020 (edited) If you don't have textures and model don't use one of the built-in then obviously they are white, can you give me SAMP objects ID's of those models? Edited August 1, 2020 by gubi Link to comment
MatreN Posted August 1, 2020 Author Share Posted August 1, 2020 4 minutes ago, gubi said: If you don't have textures and model don't use one of the built-in then obviously they are white, can you give me SAMP objects ID's of those models? Link to comment
gubi Posted August 1, 2020 Share Posted August 1, 2020 You need to include also .TXD from SA-MP files (gta3.img as far as i remember). For example for object 'MBridge150m1.dff' you need cs_ebridge.txd, you can check which TXD you need by typing model name/id over here. , fe. MBridge150m1 Link to comment
MatreN Posted August 1, 2020 Author Share Posted August 1, 2020 i try to it did not work @gubi Link to comment
Administrators Tut Posted August 1, 2020 Administrators Share Posted August 1, 2020 A lot of SAMP objects are made to load their textures from .txd files inside of gta3.img of your GTA SA installation, therefore you'll have to extract that from your game files and not from SAMP files. The .txd files stored in samp.img are usually only for models that makes use of custom textures, or for textures cut down to lower dimensions than their originals, like a SWAT helmet, its GTA texture is 256x512, so SAMP would ideally make a custom .txd that's 32x32 because the helmet is that small on the image. 38 minutes ago, MatreN said: i try to it did not work @gubi Can you please describe what you tried, optionally in steps, so that we can verify that you were doing it correctly? Link to comment
MatreN Posted August 1, 2020 Author Share Posted August 1, 2020 1. I extract cs_ebridge.txd from the gta3.img file and changed the name of the file, I did Example MRoadTwist15DegR.txd. 2. And then I wrote it into meta.xml and scripts.lua. I then tried it in another way. MRoadTwist15DegR.col MRoadTwist15DegR.dff cs_ebridge.txd I tried as. But it didn't work. Link to comment
Administrators Tut Posted August 1, 2020 Administrators Share Posted August 1, 2020 (edited) Ok, I can confirm it's an issue on your end. It might be a scripting issue, in which case you won't find much advise from me. I can however recommend you load in the following order; COL; TXD; DFF. If it's loaded in another order, I believe it won't load correctly. You can read more about that on the function page and its notes: https://wiki.multitheftauto.com/wiki/EngineReplaceModel Edited August 2, 2020 by Tut correcting misleading information Link to comment
MatreN Posted August 1, 2020 Author Share Posted August 1, 2020 its working, but it goes through the object. @Tut Link to comment
Administrators Tut Posted August 1, 2020 Administrators Share Posted August 1, 2020 1 minute ago, MatreN said: its working, but it goes through the object. @Tut In what sense? I don't understand the problem. Link to comment
MatreN Posted August 1, 2020 Author Share Posted August 1, 2020 1 minute ago, Tut said: In what sense? I don't understand the problem. The collision on the object is true, but it is passed through inside the object. function replaceObject() txd = engineLoadTXD ( "MRoadTwist15DegR.txd" ) engineImportTXD ( txd, 4150) dff = engineLoadDFF ( "MRoadTwist15DegR.dff", 4150) engineReplaceModel ( dff, 4150) col = engineLoadCOL( "MRoadTwist15DegR.col", 4150) engineReplaceCOL ( dff, 4150) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceObject) Link to comment
Administrators Tut Posted August 1, 2020 Administrators Share Posted August 1, 2020 (edited) On 01/08/2020 at 18:26, MatreN said: The collision on the object is true, but it is passed through inside the object. function replaceObject() txd = engineLoadTXD ( "MRoadTwist15DegR.txd" ) engineImportTXD ( txd, 4150) dff = engineLoadDFF ( "MRoadTwist15DegR.dff", 4150) engineReplaceModel ( dff, 4150) col = engineLoadCOL( "MRoadTwist15DegR.col", 4150) engineReplaceCOL ( dff, 4150) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceObject) I would assume you would exchange the ( dff, 4150) with ( col, 4150)? It's the only logical thing I can see even though I'm not a programmer. col = engineLoadCOL( "MRoadTwist15DegR.col", 4150) engineReplaceCOL ( dff, 4150) I would also recommend you follow the loading structure that I described above, which would be COL -> TXD -> DFF. Your structure is TXD -> DFF -> COL, so that might be an issue, but then again I'm not a programmer so I'd rather not represent myself as a good source of knowledge on that part. Edited August 2, 2020 by Tut correcting misleading information Link to comment
MatreN Posted August 1, 2020 Author Share Posted August 1, 2020 I'm sorry, I am very careless in these jobs. XD Link to comment
Scripting Moderators ds1-e Posted August 1, 2020 Scripting Moderators Share Posted August 1, 2020 3 hours ago, Tut said: I would assume you would exchange the ( dff, 4150) with ( col, 4150)? It's the only logical thing I can see even though I'm not a programmer. col = engineLoadCOL( "MRoadTwist15DegR.col", 4150) engineReplaceCOL ( dff, 4150) I would also recommend you follow the loading structure that I described above, which would be TXD -> COL -> DFF. Your structure is TXD -> DFF -> COL, so that might be an issue, but then again I'm not a programmer so I'd rather not represent myself as a good source of knowledge on that part. Afaik the right order is: COL -> TXD -> DFF. Link to comment
Administrators Tut Posted August 1, 2020 Administrators Share Posted August 1, 2020 5 minutes ago, majqq said: Afaik the right order is: COL -> TXD -> DFF. Yeah that's what I use. Thanks for the correction 1 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