denny199 Posted November 30, 2012 Share Posted November 30, 2012 Hey there, I've started a new project but I can't figure something out. How can I load lua files for only the player itself without calling it from the resource with exports and calling. I've heard something about loadstring, but I don't know if I need to use that. Or do I need to use the fileOpen, fileWrite, etc.. functions? I will be pleasured when somebody can help me out Regards, Danny Link to comment
Cadu12 Posted November 30, 2012 Share Posted November 30, 2012 If am I right, you can use triggerEventClient after loadstring. Link to comment
denny199 Posted November 30, 2012 Author Share Posted November 30, 2012 and how could I use loadstring from a another resource? example The loadstring function will be in "resources/danny/lol.lua" and then it will load a string from; "resources/gamemode/loading.lua" BTW, it needs to be downloaded to the "loading.lua" Link to comment
Cadu12 Posted November 30, 2012 Share Posted November 30, 2012 Maybe I understand you, are you talking about multi-gamemodes? Link to comment
denny199 Posted November 30, 2012 Author Share Posted November 30, 2012 Yes. It might look like "idea stealing". But I only want to make this for another gamemodes, not race =,=. So, what do I need to use? Link to comment
Anderl Posted November 30, 2012 Share Posted November 30, 2012 local file = fileOpen( ":resource/file.ext" ); if ( file ) then loadstring( fileRead( file, fileGetSize( file ) ) )(); end fileClose( file ); 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