Author Topic: MSAC Controller  (Read 2260 times)

0 Members and 1 Guest are viewing this topic.

Offline OuR

  • Major(1)
  • Posts: 6
MSAC Controller
« on: April 08, 2011, 06:26:50 pm »
Script Name: MSAC Controller
Script Description: This simple script allows to enable / disable Mologie Soldat Anti-Cheat (MSAC) from command.
Original Author(s): OuR
Core Version: 2.6.5

Commands:
 
  • /msac - Enable / disable Anti-cheat
  • /statusmsac - Check the status of the Anti-cheat

Thanks to:
rhide - for WriteINI procedure
DorkeyDear - for Explode function
PerroAZUL - for INI functions

Code:
Code: [Select]
[...]

var
SoldatINI: TINIFile;
begin

SoldatINI := iniLoad('soldat.ini');

if (Text = '/msac') then
begin
if iniGetValue(SoldatINI, 'NETWORK', 'BattlEye_Anti_Cheat', '') = '1' then
begin
WriteINI('soldat.ini','NETWORK','BattlEye_Anti_Cheat','0');
WriteConsole(0,'Anti-cheat disabled', Color);
WriteConsole(0,'Restarting server...', Color);
Command('/loadcon');
end
else
WriteINI('soldat.ini','NETWORK','BattlEye_Anti_Cheat','1');
WriteConsole(0,'Anti-cheat enabled', Color);
WriteConsole(0,'Restarting server...', Color);
Command('/loadcon');
end;

[...]
« Last Edit: April 09, 2011, 04:00:24 pm by OuR »
"Death is part of life."

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: MSAC Controller
« Reply #1 on: April 09, 2011, 05:29:59 am »
Nice, this may come in handy

Im chill like that

Offline OuR

  • Major(1)
  • Posts: 6
Re: MSAC Controller
« Reply #2 on: April 09, 2011, 03:59:46 pm »
UPDATE v1.0 -> v1.1

* I swapped the standard ReadINI function on INI functions by PerroAZUL.
Script updated in 1st post.
"Death is part of life."