Jump to content

Client configuration file?


DEFCON1

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...