ItsMods

Full Version: how add multiple xuid in SetServerCFG
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

i want to add multiple xuid but with this code i just can add one xuid Sad

SetServerCFG("protect", "protect_xuids", client.XUID );

pleas someone edit this code for me thanks.
Split the XUIDs and add them afterwards with ","
:|
i want do that with SetServerCFG not my self
xuid1 + ";" + xuid2 ?
my means when i use !protect playername ,his xuid added to sv_config.ini with:
CSHARP Code
  1. SetServerCFG("protect", "protect_xuids", client.XUID).Split(new char[] { ',' });

and i know this is not correct .
but with :
CSHARP Code
  1. SetServerCFG("protect", "protect_xuids", client.XUID );

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 .
CSHARP Code
  1. SetServerCFG("protect", "protect_xuids", GetServerCFG("protect", "protect_xuids", string.Empty ) + ";" + client.XUID );
(10-24-2012, 18:45)raminr63 Wrote: [ -> ]:|
i want do that with SetServerCFG not my self

well , you aint getting the concept over here
Or you can do this
CSHARP Code
  1. int numberOfProtect_XUIDs=int.Parse(GetServerCFG("protect", "protect_xuids", "0" ));
  2. if(numberOfProtect_XUIDs!=0)
  3. {
  4. SetServerCFG("protect","protect_xuids"+numberOdProtect_XUIDs++.ToString(),Client.XUID);
  5. }

I didn't even check it would compile though