Guest Posted August 5, 2017 Share Posted August 5, 2017 Hello MTA community, I recently add some custom objects to my map DFF and COL works fine but textures are missing. Idk why becouse the script is correct without errors or something else here is small part of it: engineImportTXD(hostelTXD, 3167); engineImportTXD(stanica_bus1TXD, 3600); engineImportTXD(stanica_bus2TXD, 10031); engineImportTXD(office_panelakTXD, 4550); engineImportTXD(knihkupectvoTXD, 1515); engineImportTXD(dom1TXD, 11469); engineImportTXD(dom2TXD, 3621); engineImportTXD(dom3TXD, 3827); engineImportTXD(dom4TXD, 11501); engineImportTXD(dom5TXD, 13697); engineImportTXD(dom6TXD, 9272); engineImportTXD(mlynTXD, 17566); engineImportTXD(veza1TXD, 7073); engineImportTXD(veza2TXD, 14865); Everything is written in meta file but after all of that textures are not showing in game it is just bunch of white build with model and colision working. Thanks for answers. Link to comment
NeXuS™ Posted August 5, 2017 Share Posted August 5, 2017 Are you sure that the TXD files are correct too? Link to comment
Administrators Lpsd Posted August 6, 2017 Administrators Share Posted August 6, 2017 (edited) Did you add a custom UV map/wrapping to your object also? If you don't have this then the texture doesn't know where to go Edited August 6, 2017 by LopSided_ Link to comment
Guest Posted August 6, 2017 Share Posted August 6, 2017 They are correct. @LopSided_ That models I download from site for example this one https://libertycity.net/files/gta-san-andreas/94243-dva-razvalennye-verandy-iz-s.t.a.l.k.e.r.html So they should have working textures. Link to comment
NeXuS™ Posted August 6, 2017 Share Posted August 6, 2017 In what order do you use the load functions? Link to comment
Guest Posted August 6, 2017 Share Posted August 6, 2017 Here is the full script. Everything works even textures for VEGETATION and for LAB X 18 (old A51 area) but the textures for BUILDINGS and DECORATIONS are not (that is the problem for them only works colision and model) addEventHandler("onClientResourceStart", resourceRoot, function() -- VEGETÁCIA - VEGETATION --// MODELY - MODELS Elmred_hi = engineLoadDFF("modely/objekty/priroda/Elmred_hi.dff", 0); Elmred_hism = engineLoadDFF("modely/objekty/priroda/Elmred_hism.dff", 0); Elmtreegrn_hi = engineLoadDFF("modely/objekty/priroda/Elmtreegrn_hi.dff", 0); Elmtreegrn_hism = engineLoadDFF("modely/objekty/priroda/Elmtreegrn_hism.dff", 0); Elmtreegrn2_hi = engineLoadDFF("modely/objekty/priroda/Elmtreegrn2_hi.dff", 0); genVEG_bush01 = engineLoadDFF("modely/objekty/priroda/genVEG_bush01.dff", 0); sand_josh1 = engineLoadDFF("modely/objekty/priroda/sand_josh1.dff", 0); sand_josh2 = engineLoadDFF("modely/objekty/priroda/sand_josh2.dff", 0); sjmpalm = engineLoadDFF("modely/objekty/priroda/sjmpalm.dff", 0); sjmpalmbig = engineLoadDFF("modely/objekty/priroda/sjmpalmbig.dff", 0); sjmpalmtall = engineLoadDFF("modely/objekty/priroda/sjmpalmtall.dff", 0); sm_bush_small_1 = engineLoadDFF("modely/objekty/priroda/sm_bush_small_1.dff", 0); sm_bushvbig = engineLoadDFF("modely/objekty/priroda/sm_bushvbig.dff", 0); sm_des_agave1 = engineLoadDFF("modely/objekty/priroda/sm_des_agave1.dff", 0); sm_veg_tree4 = engineLoadDFF("modely/objekty/priroda/sm_veg_tree4.dff", 0); sm_veg_tree6 = engineLoadDFF("modely/objekty/priroda/sm_veg_tree6.dff", 0); sm_veg_tree7vbig = engineLoadDFF("modely/objekty/priroda/sm_veg_tree7vbig.dff", 0); sm_vegvbbig = engineLoadDFF("modely/objekty/priroda/sm_vegvbbig.dff", 0); vbg_fir_copse = engineLoadDFF("modely/objekty/priroda/vbg_fir_copse.dff", 0); veg_palm02 = engineLoadDFF("modely/objekty/priroda/veg_palm02.dff", 0); veg_palm03 = engineLoadDFF("modely/objekty/priroda/veg_palm03.dff", 0); veg_palm04 = engineLoadDFF("modely/objekty/priroda/veg_palm04.dff", 0); veg_palmbig14 = engineLoadDFF("modely/objekty/priroda/veg_palmbig14.dff", 0); veg_palmkb13 = engineLoadDFF("modely/objekty/priroda/veg_palmkb13.dff", 0); veg_palwee02 = engineLoadDFF("modely/objekty/priroda/veg_palwee02.dff", 0); veg_tree3 = engineLoadDFF("modely/objekty/priroda/veg_tree3.dff", 0); veg_treea1 = engineLoadDFF("modely/objekty/priroda/veg_treea1.dff", 0); veg_treea3 = engineLoadDFF("modely/objekty/priroda/veg_treea3.dff", 0); veg_treeb1 = engineLoadDFF("modely/objekty/priroda/veg_treeb1.dff", 0); vgs_palm01 = engineLoadDFF("modely/objekty/priroda/vgs_palm01.dff", 0); vgs_palm03 = engineLoadDFF("modely/objekty/priroda/vgs_palm03.dff", 0); vgs_palm04 = engineLoadDFF("modely/objekty/priroda/vgs_palm04.dff", 0); vgs_palmvtall = engineLoadDFF("modely/objekty/priroda/vgs_palmvtall.dff", 0); vgsn_nitree_b01 = engineLoadDFF("modely/objekty/priroda/vgsn_nitree_b01.dff", 0); vgsn_nitree_r01 = engineLoadDFF("modely/objekty/priroda/vgsn_nitree_r01.dff", 0); vgsn_nitree_y01 = engineLoadDFF("modely/objekty/priroda/vgsn_nitree_y01.dff", 0); --// TEXTÚRY - TEXTURES badlands = engineLoadTXD("modely/objekty/priroda/badlands.txd"); des_trees = engineLoadTXD("modely/objekty/priroda/des_trees.txd"); gta_cactus = engineLoadTXD("modely/objekty/priroda/gta_cactus.txd"); gta_deserttrees = engineLoadTXD("modely/objekty/priroda/gta_deserttrees.txd"); gta_potplantsaa = engineLoadTXD("modely/objekty/priroda/gta_potplantsaa.txd"); gta_proc_bush = engineLoadTXD("modely/objekty/priroda/gta_proc_bush.txd"); gta_proc_ferns = engineLoadTXD("modely/objekty/priroda/gta_proc_ferns.txd"); gta_proc_grassland = engineLoadTXD("modely/objekty/priroda/gta_proc_grassland.txd"); gta_proc_grasslanda = engineLoadTXD("modely/objekty/priroda/gta_proc_grasslanda.txd"); gta_proc_rushes = engineLoadTXD("modely/objekty/priroda/gta_proc_rushes.txd"); gta_procdesert = engineLoadTXD("modely/objekty/priroda/gta_procdesert.txd"); gta_tree_bevhills = engineLoadTXD("modely/objekty/priroda/gta_tree_bevhills.txd"); gta_tree_boak = engineLoadTXD("modely/objekty/priroda/gta_tree_boak.txd"); gta_tree_oldpine = engineLoadTXD("modely/objekty/priroda/gta_tree_oldpine.txd"); gta_tree_palm = engineLoadTXD("modely/objekty/priroda/gta_tree_palm.txd"); gta_tree_pine = engineLoadTXD("modely/objekty/priroda/gta_tree_pine.txd"); gta_tree_pineprc = engineLoadTXD("modely/objekty/priroda/gta_tree_pineprc.txd"); gtatreesh = engineLoadTXD("modely/objekty/priroda/gtatreesh.txd"); gtatreesh04 = engineLoadTXD("modely/objekty/priroda/gtatreesh04.txd"); gtatreeshi = engineLoadTXD("modely/objekty/priroda/gtatreeshi.txd"); gtatreeshi7 = engineLoadTXD("modely/objekty/priroda/gtatreeshi7.txd"); gtatreeshi9 = engineLoadTXD("modely/objekty/priroda/gtatreeshi9.txd"); gtatreeshifir = engineLoadTXD("modely/objekty/priroda/gtatreeshifir.txd"); tree1 = engineLoadTXD("modely/objekty/priroda/tree1.txd"); tree1prc = engineLoadTXD("modely/objekty/priroda/tree1prc.txd"); tree3 = engineLoadTXD("modely/objekty/priroda/tree3.txd"); tree3prc = engineLoadTXD("modely/objekty/priroda/tree3prc.txd"); vgsn_nitree = engineLoadTXD("modely/objekty/priroda/vgsn_nitree.txd"); --// ZMENA MODELOV A TEXTÚR - CHANGE OF MODELS AND TEXTURES engineLoadDFF(Elmred_hi, 772); engineLoadDFF(Elmred_hism, 778); engineLoadDFF(Elmtreegrn_hi, 767); engineLoadDFF(Elmtreegrn_hism, 782); engineLoadDFF(Elmtreegrn2_hi, 768); engineLoadDFF(genVEG_bush01, 801); engineLoadDFF(sand_josh1, 904); engineLoadDFF(sand_josh2, 858); engineLoadDFF(sjmpalm, 649); engineLoadDFF(sjmpalmbig, 652); engineLoadDFF(sjmpalmtall, 739); engineLoadDFF(sm_bush_small_1, 760); engineLoadDFF(sm_bushvbig, 707); engineLoadDFF(sm_des_agave1, 677); engineLoadDFF(sm_veg_tree4, 669); engineLoadDFF(sm_veg_tree6, 700); engineLoadDFF(sm_veg_tree7vbig, 705); engineLoadDFF(sm_vegvbbig, 706); engineLoadDFF(vbg_fir_copse, 791); engineLoadDFF(veg_palm02, 621); engineLoadDFF(veg_palm03, 622); engineLoadDFF(veg_palm04, 620); engineLoadDFF(veg_palmbig14, 645); engineLoadDFF(veg_palmkb13, 641); engineLoadDFF(veg_palwee02, 624); engineLoadDFF(veg_tree3, 615); engineLoadDFF(veg_treea1, 616); engineLoadDFF(veg_treea3, 618); engineLoadDFF(veg_treeb1, 617); engineLoadDFF(vgs_palm01, 710); engineLoadDFF(vgs_palm03, 712); engineLoadDFF(vgs_palm04, 718); engineLoadDFF(vgs_palmvtall, 740); engineLoadDFF(vgsn_nitree_b01, 3511); engineLoadDFF(vgsn_nitree_r01, 3509); engineLoadDFF(vgsn_nitree_y01, 3505); --... --... engineImportTXD(badlands, 701); engineImportTXD(des_trees, 16060); engineImportTXD(gta_cactus, 650); engineImportTXD(gta_deserttrees, 674); engineImportTXD(gta_potplantsaa, 625); engineImportTXD(gta_proc_bush, 647); engineImportTXD(gta_proc_ferns, 801); engineImportTXD(gta_proc_grassland, 812); engineImportTXD(gta_proc_grasslanda, 804); engineImportTXD(gta_proc_rushes, 806); engineImportTXD(gta_procdesert, 858); engineImportTXD(gta_tree_bevhills, 716); engineImportTXD(gta_tree_boak, 615); engineImportTXD(gta_tree_oldpine, 654); engineImportTXD(gta_tree_palm, 619); engineImportTXD(gta_tree_pine, 670); engineImportTXD(gta_tree_pineprc, 881); engineImportTXD(gtatreesh, 726); engineImportTXD(gtatreesh04, 727); engineImportTXD(gtatreeshi, 728); engineImportTXD(gtatreeshi7, 729); engineImportTXD(gtatreeshi9, 731); engineImportTXD(gtatreeshifir, 730); engineImportTXD(tree1, 767); engineImportTXD(tree1prc, 886); engineImportTXD(tree3, 882); engineImportTXD(tree3prc, 882); engineImportTXD(vgsn_nitree, ID); end); addEventHandler("onClientResourceStart", resourceRoot, function() -- BUDOVY - BUILDINGS --// MODELY - MODELS hostelDFF = engineLoadDFF("modely/objekty/stavby/trailer_large1_01.dff", 0); stanica_bus1DFF = engineLoadDFF("modely/objekty/stavby/hillhouse13_LA.dff", 0); stanica_bus2DFF = engineLoadDFF("modely/objekty/stavby/land:~_24_sfe.dff", 0); office_panelakDFF = engineLoadDFF("modely/objekty/stavby/LibrTow1_LAn.dff", 0); knihkupectvoDFF = engineLoadDFF("modely/objekty/stavby/DYN_SLOT_PROP.dff", 0); dom1DFF = engineLoadDFF("modely/objekty/stavby/des_bigbull.dff", 0); dom2DFF = engineLoadDFF("modely/objekty/stavby/dckwrkhut.dff", 0); dom3DFF = engineLoadDFF("modely/objekty/stavby/box_hse_07_SFXRF.dff", 0); dom4DFF = engineLoadDFF("modely/objekty/stavby/des_westrn9_03.dff", 0); dom5DFF = engineLoadDFF("modely/objekty/stavby/TCElhouse06.dff", 0); dom6DFF = engineLoadDFF("modely/objekty/stavby/preshoos03_SFN02.dff", 0); mlynDFF = engineLoadDFF("modely/objekty/stavby/carlshou1_LAe2.dff", 0); veza1DFF = engineLoadDFF("modely/objekty/stavby/vegascowboy1.dff", 0); veza2DFF = engineLoadDFF("modely/objekty/stavby/bobbi-room01.dff", 0); --// KOLÍZIE - COLISIONS hostelCOL = engineLoadCOL("modely/objekty/stavby/:Oysouth.col"); stanica_bus1COL = engineLoadCOL("modely/objekty/stavby/laxref.col"); stanica_bus2COL = engineLoadCOL("modely/objekty/stavby/sfe_8.col"); office_panelakCOL = engineLoadCOL("modely/objekty/stavby/lan2_2.col"); knihkupectvoCOL = engineLoadCOL("modely/objekty/stavby/dynamic2.col"); dom1COL = engineLoadCOL("modely/objekty/stavby/countryn_4.col"); dom2COL = engineLoadCOL("modely/objekty/stavby/laxrefdocks.col"); dom3COL = engineLoadCOL("modely/objekty/stavby/sfxref.col"); dom4COL = engineLoadCOL("modely/objekty/stavby/countryn_9.col"); dom5COL = engineLoadCOL("modely/objekty/stavby/lahills_5.col"); dom6COL = engineLoadCOL("modely/objekty/stavby/sfn_1.col"); mlynCOL = engineLoadCOL("modely/objekty/stavby/lae2_4.col"); veza1COL = engineLoadCOL("modely/objekty/stavby/vegasn_4.col"); veza2COL = engineLoadCOL("modely/objekty/stavby/gen_int4_1.col"); --// TEXTÚRY - TEXTURES hostelTXD = engineLoadTXD("modely/objekty/stavby/trailers.txd"); stanica_bus1TXD = engineLoadTXD("modely/objekty/stavby/hillhousex13_6.txd"); stanica_bus2TXD = engineLoadTXD("modely/objekty/stavby/chinatown2.txd"); office_panelakTXD = engineLoadTXD("modely/objekty/stavby/skyscr1_lan2.txd"); knihkupectvoTXD = engineLoadTXD("modely/objekty/stavby/dsfs.txd"); dom1TXD = engineLoadTXD("modely/objekty/stavby/des_steakhouse.txd"); dom2TXD = engineLoadTXD("modely/objekty/stavby/dockcargo1_las.txd"); dom3TXD = engineLoadTXD("modely/objekty/stavby/boxhses_SFSX.txd"); dom4TXD = engineLoadTXD("modely/objekty/stavby/des_farmstuff.txd"); dom5TXD = engineLoadTXD("modely/objekty/stavby/lahillshilhs1d.txd"); dom6TXD = engineLoadTXD("modely/objekty/stavby/presidio01_SFN.txd"); mlynTXD = engineLoadTXD("modely/objekty/stavby/contachou1_lae2.txd"); veza1TXD = engineLoadTXD("modely/objekty/stavby/vgnfremntsgn.txd"); veza2TXD = engineLoadTXD("modely/objekty/stavby/gf2.txd"); --// ZMENA MODELOV, COLÍZII A TEXTÚR - CHANGE OF MODELS, COLLISIONS AND TEXTURES engineReplaceModel(hostelDFF, 3167); engineReplaceModel(stanica_bus1DFF, 3609); engineReplaceModel(stanica_bus2DFF, 10031); engineReplaceModel(office_panelakDFF, 4550); engineReplaceModel(knihkupectvoDFF, 1515); engineReplaceModel(dom1DFF, 11470); engineReplaceModel(dom2DFF, 3626); engineReplaceModel(dom3DFF, 3827); engineReplaceModel(dom4DFF, 11501); engineReplaceModel(dom5DFF, 13697); engineReplaceModel(dom6DFF, 9272); engineReplaceModel(mlynDFF, 17697); engineReplaceModel(veza1DFF, 7073); engineReplaceModel(veza2DFF, 14865); --... --... engineReplaceCOL(hostelCOL, 3167); engineReplaceCOL(stanica_bus1COL, 3609); engineReplaceCOL(stanica_bus2COL, 10031); engineReplaceCOL(office_panelakCOL, 4550); engineReplaceCOL(knihkupectvoCOL, 1515); engineReplaceCOL(dom1COL, 11470); engineReplaceCOL(dom2COL, 3626); engineReplaceCOL(dom3COL, 3827); engineReplaceCOL(dom4COL, 11501); engineReplaceCOL(dom5COL, 13697); engineReplaceCOL(dom6COL, 9272); engineReplaceCOL(mlynCOL, 17697); engineReplaceCOL(veza1COL, 7073); engineReplaceCOL(veza2COL, 14865); --... --... engineImportTXD(hostelTXD, 3167); engineImportTXD(stanica_bus1TXD, 3600); engineImportTXD(stanica_bus2TXD, 10031); engineImportTXD(office_panelakTXD, 4550); engineImportTXD(knihkupectvoTXD, 1515); engineImportTXD(dom1TXD, 11469); engineImportTXD(dom2TXD, 3621); engineImportTXD(dom3TXD, 3827); engineImportTXD(dom4TXD, 11501); engineImportTXD(dom5TXD, 13697); engineImportTXD(dom6TXD, 9272); engineImportTXD(mlynTXD, 17566); engineImportTXD(veza1TXD, 7073); engineImportTXD(veza2TXD, 14865); end); addEventHandler("onClientResourceStart", resourceRoot, function() -- DEKORÁCIE - DECORATIONS --// MODELY - MODELS volgaDFF = engineLoadDFF("modely/objekty/dekoracia/briefcase.dff", 0); ikarusBusDFF = engineLoadDFF("modely/objekty/dekoracia/:Owjunk01.dff", 0); pickupDFF = engineLoadDFF("modely/objekty/dekoracia/sw_pickupwreck01.dff", 0); smetiDFF = engineLoadDFF("modely/objekty/dekoracia/blackbag2.dff", 0); --// KOLÍZIE - COLISIONS volgaCOL = engineLoadCOL("modely/objekty/dekoracia/dynamic.col"); ikarusBusCOL = engineLoadCOL("modely/objekty/dekoracia/countrys_2.col"); --// TEXTÚRY - TEXTURES volgaTXD = engineLoadTXD("modely/objekty/dekoracia/briefcase.txd"); ikarusBusTXD = engineLoadTXD("modely/objekty/dekoracia/cw_junkyarddigcs_t.txd"); pickupTXD = engineLoadTXD("modely/objekty/dekoracia/sw_oldshack.txd"); smetiTXD = engineLoadTXD("modely/objekty/dekoracia/drubish.txd"); --// ZMENA TEXTÚR, MODELOV A KOLÍZII - CHANGE OF TEXTURES, MODELS AND COLISIONS engineReplaceModel(volgaDFF, 1210); engineReplaceModel(ikarusBusDFF, 18248); engineReplaceModel(pickupDFF, 12957); engineReplaceModel(smetiDFF, 1265); --... --... engineReplaceCOL(volgaCOL, 1210); engineReplaceCOL(ikarusBusCOL, 18248); --... --... engineImportTXD(volgaTXD, 1210); engineImportTXD(ikarusBusTXD, 18247); engineImportTXD(pickupTXD, 12937); engineImportTXD(smetiTXD, 1264); end); addEventHandler("onClientResourceStart", resourceRoot, function() -- LAB X 18 (OLD A51) --// TEXTÚRY - TEXTURES a51 = engineLoadTXD("modely/objekty/lab_x_18/a51.txd"); a51_alpha = engineLoadTXD("modely/objekty/lab_x_18/a51_alpha.txd"); a51_detailstuff = engineLoadTXD("modely/objekty/lab_x_18/a51_detailstuff.txd"); a51_ext = engineLoadTXD("modely/objekty/lab_x_18/a51_ext.txd"); a51_labs = engineLoadTXD("modely/objekty/lab_x_18/a51_labs.txd"); a51_spotlight = engineLoadTXD("modely/objekty/lab_x_18/a51_spotlight.txd"); a51_stores = engineLoadTXD("modely/objekty/lab_x_18/a51_stores.txd"); a51_undergrnd = engineLoadTXD("modely/objekty/lab_x_18/a51_undergrnd.txd"); country_breakable = engineLoadTXD("modely/objekty/lab_x_18/country_breakable.txd"); des_cen = engineLoadTXD("modely/objekty/lab_x_18/des_cen.txd"); milbase = engineLoadTXD("modely/objekty/lab_x_18/milbase.txd"); moregenroofstuff = engineLoadTXD("modely/objekty/lab_x_18/moregenroofstuff.txd"); --// ZMENA TEXTÚR - CHANGE OF TEXTURES engineImportTXD(a51, 16640); engineImportTXD(a51_alpha, 16646); engineImportTXD(a51_detailstuff, 16644); engineImportTXD(a51_ext, 16093); engineImportTXD(a51_labs, 16639); engineImportTXD(a51_spotlight, 2887); engineImportTXD(a51_stores, 16322); engineImportTXD(a51_undergrnd, 16293); engineImportTXD(country_breakable, 3221); engineImportTXD(des_cen, 16102); engineImportTXD(milbase, 3267); engineImportTXD(moregenroofstuff, 1692); end); Link to comment
NeXuS™ Posted August 6, 2017 Share Posted August 6, 2017 Quote To successfully load your model with textures, be sure to use engineLoadTXD and engineImportTXD before calling this function. If some error occurs while loading the DFF, MTA will output a message - check out DFF error messages to know what they mean. Link to comment
Guest Posted August 6, 2017 Share Posted August 6, 2017 Oh what a stupid mistake. Anyway thanks a lot man. 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