SanZoR Posted January 9, 2008 Share Posted January 9, 2008 Hello, I been searching now there forums for a few mins, and i fount a lot of posts, where were people asking a model replacing script. It seems they never get working one. So, now im asking can someone make one. It should be just clientside script, so the new model is possible to download from my resource site. (I setted it to do so in server confing file) So it should work like this: txd = engineLoadTXD ( "phoenix.txd" ) engineImportTXD ( txd, 603 ) dff = engineLoadDFF ( "phoenix.dff", 603 ) engineReplaceModel ( dff, 603 ) These new models are located in /resources/phoenix_mod/phoenix.txd & .dff aswell as the script. It should replace all models instantly, i mean there is no /replace or another stuff, and downloads the mods instantly when player joins. Im sure this is easy to make, but there is a lot of not-so-good lua scripters around, like me Anyway, thanks in advance Link to comment
kevuwk Posted January 9, 2008 Share Posted January 9, 2008 function resourceStart ( thisResource ) txd = engineLoadTXD ( "phoenix.txd" ) engineImportTXD ( txd, 603 ) dff = engineLoadDFF ( "phoenix.dff", 603 ) engineReplaceModel ( dff, 603 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(), resourceStart ) <script src="replace.lua" type="client"/> use tags for phoenix.txd and phoenix.dff and that might just work (i'm not 100% confident, never dont it before ) Link to comment
SanZoR Posted January 9, 2008 Author Share Posted January 9, 2008 This part is not needed in meta.xml? <file src="phoenix.dff" /> <file src="phoenix.txd" /> Link to comment
kevuwk Posted January 9, 2008 Share Posted January 9, 2008 yes it is, just wasn't sure how it was structured, i did say "use tags for phoenix.txd and phoenix.dff" Link to comment
SanZoR Posted January 9, 2008 Author Share Posted January 9, 2008 ah, ok, thank you, now i get it Link to comment
Simbad de Zeeman Posted January 9, 2008 Share Posted January 9, 2008 And ? did it worked? Link to comment
SanZoR Posted January 9, 2008 Author Share Posted January 9, 2008 Yeah, i just tweaked it lil bit by adding that file tag & new vehicle mods =) Link to comment
Simbad de Zeeman Posted January 9, 2008 Share Posted January 9, 2008 Can you tell me what you did to make it work? Link to comment
SanZoR Posted January 9, 2008 Author Share Posted January 9, 2008 function resourceStart ( thisResource ) txd = engineLoadTXD ( "car.txd", 402 ) engineImportTXD ( txd, 402 ) dff = engineLoadDFF ( "car.dff", 402 ) engineReplaceModel ( dff, 402 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(), resourceStart ) Change car.txd & car.dff to car that you would like to replace. Also the "402" number to the ID of the vehicle. See all ID:s in http://www.vces.net/info/index.php And: <meta> <info author="SanZoR" name="car_mod" version="1" type="script" /> <script src="car.lua" type="client" /> <file src="car.dff" /> <file src="car.txd" /> </meta> ... I think you know this long what to do Link to comment
Simbad de Zeeman Posted January 9, 2008 Share Posted January 9, 2008 Yes i know, my code is ok, but it just doesn't replace the models, i got the same script as you, it downloads the files and when i replace it it does nothing, even no error in the log.. Link to comment
SanZoR Posted January 9, 2008 Author Share Posted January 9, 2008 With this everything is fine for me Add me to your msn if you wanna more help. My msn is [email protected] Link to comment
kevuwk Posted January 9, 2008 Share Posted January 9, 2008 Yes i know, my code is ok, but it just doesn't replace the models, i got the same script as you, it downloads the files and when i replace it it does nothing, even no error in the log.. are you then actually creating a vehicle? Link to comment
Simbad de Zeeman Posted January 9, 2008 Share Posted January 9, 2008 Ye it works now atm im getting download errrors now, i just copied the dff and txd files manually and it worked Link to comment
Frank-De-Ruiter Posted January 9, 2008 Share Posted January 9, 2008 With the download errors then your http port is not open or your url is not set, however the url doesnt have to be set the server then just gos to the intern webserver. so then i sould the http port wich standard = 22005 Greatings Frank 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