Antibird Posted November 18, 2009 Share Posted November 18, 2009 Hello there. To simplify manipulations with my different hud modes, I've decided to make a separate .lua files for each of them and then use dofile() function to load it all "with just one click". When nothing appeared to work, I've searched through this forum and found that dofile() is "blocked by MTA": https://forum.multitheftauto.com/viewtop ... le#p285545 I've failed to think up any workaround rather than put all code I needed to execute into one function and load it in a very ordinary way. This does the job, but I wonder of 2 things: 1. Will dofile() be available one day? 2. I don't know much about LUA basic functions, so maybe there's a way to replace dofile() with something else can open a file and run the code wrote in it? Link to comment
Gamesnert Posted November 18, 2009 Share Posted November 18, 2009 You can make one yourself (which only works server-side, however) with the file functions + loadstring. Client-side file functions are requested on the bug tracker. Link to comment
eAi Posted November 18, 2009 Share Posted November 18, 2009 Why not add the files to the meta.xml? Link to comment
Antibird Posted November 19, 2009 Author Share Posted November 19, 2009 Why not add the files to the meta.xml? There they are. Thank you for answering anyway. 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