Adding new vars to the server.cfg
#1

Is this possible? When I try to add a new var, it does not show in the console when I type "varlist", and if I try to GetServerVarAsString the server crashes.
Reply
#2

Bump.
Reply
#3

Bump.
Reply
#4

No. That is possible but not 'legally'.
Reply
#5

Well I just wanted to use it for an honest application.

I wanted to set MySQL credentials without having to edit/compile or read through files.
Reply
#6

Maybe?
Код:
new string[128];
new rcon_string[32];
GetServerVarAsString("newvar", rcon_string, sizeof(rcon_string));
format(string, sizeof(string), "newvar: %s", rcon_string);
SendClientMessage(playerid, COLOR_YELLOW, string);
Reply
#7

That is essentially what I have done, but it crashes.

Now that I think about it, "varlist" even lists things that are not in the server list by default, i.e. "version", "timestamp", "bind", etc...

So maybe you cannot add new server variables through the server.cfg, but where?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)