Any possible way to do this? I really don’t want to send endless usermessages or net messages.
Why would you want to do this?
It’s possible, but I can imagine a better way of getting something like this done a lot better.
Because maybe you have a lot of shared data, such as translations etc. that you want to transmit, could be various things.
Doesn’t matter, resource.AddFile should do the job.
Bless your face Wizard of Ass.
I knew I was missing something.
+rep once again.
Oh yeah, can you do this during a map, or is a map change required?
This is a bad idea, a very very bad idea.
You never let your clients have control over the server.
Ahem, they’re text files. What would they possible include that give clients control over the server?
I think you misread my post.
I think you miswrote your post, how Wizard deducted what you meant is beyond me. You clearly said “Let clients read server .txt files” which would be bad, you don’t let them read whatever files they want, as it’s usually safe to assume these files aren’t available to the clients.
Fine, if you want a bigger perspective, here it is:
I’m saving logs as .txt files on the server.
I want the clients to be able to read these files (I’ve made a GUI with derma)
Everything’s working perfectly.
But I have no clue how to allow clients to do something similar to file.Read, but read server files instead of local files.
How did you get the idea that I was gonna let clients “control the server”. What do you think servers use .txts for?
If you implemented a function like
ReadFromServer( path )
Then you’ve given me access to read any file on your server, or any file on the data directory. Which is bad.
Also, resource.AddFile won’t send files to clients real time, it’ll only add them to a list of files that’s downloaded when the client joins.
What the hell can you do when you’ve read a damn text file from the server? I really don’t see your side of the argument.
Thank you for your final piece of information, it seems like the first useful information you’ve parsed in the thread so far.
It’s something you don’t do.
Just a couple things that I found in my own data folder :
- Expression 2 files
- Advanced duplications
- ULX logs ( contains player’s IPs )
- All ULX data ( not always a bad thing if players have it )
I don’t know what you’re running, so I don’t know what’s there.
Addons in general assume players can’t read from there, which means it’s dangerous. For example, what if some addon had stored passwords in their for whatever reason?
You are not getting how it works, the servers explicitly SENDS the files, the client does not magically open a file on the server.
OP doesn’t mean literally read directly off of the server.
Make a Lua file.
AddCSLuaFile() that file.
include() that file.