Posts: 338
Threads: 19
Joined: Jan 2012
Reputation:
32
Split the XUIDs and add them afterwards with ","
Posts: 224
Threads: 54
Joined: Mar 2011
Reputation:
2
:|
i want do that with SetServerCFG not my self
Posts: 224
Threads: 54
Joined: Mar 2011
Reputation:
2
10-25-2012, 08:33
(This post was last modified: 10-25-2012, 08:35 by raminr63.)
my means when i use !protect playername ,his xuid added to sv_config.ini with:
[code=csharp]
SetServerCFG("protect", "protect_xuids", client.XUID).Split(new char[] { ',' });
[/code]
and i know this is not correct .
but with :
[code=csharp]
SetServerCFG("protect", "protect_xuids", client.XUID );
[/code]
it just work for one player and when i want to add multiple player to protect, SetServerCFG just write the one xuid to" protect_xuids" with new one .
Posts: 1,323
Threads: 24
Joined: Nov 2010
Reputation:
91
10-25-2012, 12:04
(This post was last modified: 10-25-2012, 12:05 by zxz0O0.)
[code=csharp]SetServerCFG("protect", "protect_xuids", GetServerCFG("protect", "protect_xuids", string.Empty ) + ";" + client.XUID );[/code]
Posts: 285
Threads: 15
Joined: Nov 2011
Reputation:
12
Or you can do this
[code=CSHARP]
int numberOfProtect_XUIDs=int.Parse(GetServerCFG("protect", "protect_xuids", "0" ));
if(numberOfProtect_XUIDs!=0)
{
SetServerCFG("protect","protect_xuids"+numberOdProtect_XUIDs++.ToString(),Client.XUID);
}
[/code]
I didn't even check it would compile though