DEFCON1 Posted January 3, 2010 Share Posted January 3, 2010 Hello again , I would like to know if it is possible to make a client configuration file, that the server send to clients only if they do not have it already. This way the clients could modify values of their own configuration file, and their configuration will stay the same across differents servers using that resource, so they do not need to reconfigure their settings each time they join a server which use that resource. Ex: - Server1 and Server2 both have the same resource - Client does not have the resource's client files - Client join Server1 and download resource's client files, including client config file, - Client modify values of his config file - Client quit Server1 - Client join Server2 and he do not re-download the config file, instead, the resource use values of existing client config file. If this is possible, can you please provide a small example? Thanks! Link to comment
Gamesnert Posted January 3, 2010 Share Posted January 3, 2010 You can just make a small client-side script for it. function nameMeWhatevahYouWant() local xmlFile = xmlLoadFile("config.whatevah") if xmlFile then -- Read it else -- Create it and set default values end end addEventHandler("onClientResourceStart",getResourceRootElement(),nameMeWhatevahYouWant) Link to comment
DEFCON1 Posted January 3, 2010 Author Share Posted January 3, 2010 That simple? Thank you, I will try Link to comment
Gamesnert Posted January 3, 2010 Share Posted January 3, 2010 That simple? You can make it as complex as you want, but yes, basically it's this simple. 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