BabY Posted November 20, 2010 Posted November 20, 2010 Hey all, I Think you Remember me Well, Back to Real I Had a Problem While Changing a Texture of an Object in my Race Map My Script : function Texture () lol = engineLoadTXD("ballysign01.txd") engineImportTXD (lol, 8394 ) end addEventHandler( "onClientResourceStart", resourceRoot, Texture ) Debug Script : Well, I Suspect The Error in the Event And, I Searched in the Wiki, and Every Thing, But I Couldn't Find a Way for it So, After all my Ideas Gone, I'am Posting Here, Willing to Find da Answer
drake989 Posted November 20, 2010 Posted November 20, 2010 (edited) function replace() txd = engineLoadTXD("ballysign01.txd") setTimer (function() engineImportTXD(txd, 8394) end,2000,1,txd) end addEventHandler('onClientResourceStart', resourceRoot, replace) addCommandHandler ( "replace", replace) Check file maybe have other name edit: in meta.xml <meta> <info author="MI550" version="0.1" type="script" /> <file src="ballysign01.txd" type="client" /> <script src="textures.lua" type="client" /> </meta> Edited November 20, 2010 by Guest
BabY Posted November 20, 2010 Author Posted November 20, 2010 @drake989 It's a Map, I Need it to Be Auto maticaly Made, When the Map start P.S = It still Show me : Line 7 bad 'txd' pointer @ 'engineImportTXD'(1) What that Means ?
drake989 Posted November 20, 2010 Posted November 20, 2010 function replaceTXD() txd = engineLoadTXD("ballysign01.txd") engineImportTXD(txd, 8394) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceTXD) and in meta.xml add; <script src="textures.lua" type="client" /> <file src="ballysign01.txd" /> <map src="yourmap.map" dimension="0" /> it should work now
BabY Posted November 20, 2010 Author Posted November 20, 2010 In Fact, When I Added This Line in the Meta, My Map Resource Got Bugged O_o I'am Glad Cuz It's not Damaged and I Can Open it, If not I WIll Kill you The Resource Got Corrupted, But only When Testing ... I'll Try to Delete Editor_Test and Editor_Dumb and Try ^^ Greetz.
BabY Posted November 20, 2010 Author Posted November 20, 2010 Oh, I Didn't Saw your Edit ......... But .... WORKING ^^ Thanks a Lot man, Without You My map won't Release TY TY TY TY
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