Sign in to follow this  
Followers 0
RamBob

Anti-Flaming-Script -> flamulator2000

3 posts in this topic

Palim Palim,

on our server we had a lot of guys that spam admin in sidechat only to say us that the person that shot him down must be a hacker, uses an aimbot and blaaaaa.
Or they wanna flame in general...

For that we wrote a small script that helps us a lot :) Maybe it helps you too.

 

Put it at the end of your initPlayerLocal.sqf for example...

[] spawn {
    _flamulator2000 = {
        _elanFlamingPointsFunc = (_this select 0) + (_this select 2);
        _elanFlamingPointsMaxFunc = _this select 1;
        _stats = format["%1/%2 Flaming-Points",_elanFlamingPointsFunc,_elanFlamingPointsMaxFunc];
        systemchat _stats;
        elanFlamerLog = format["try to flame -> %1",(_this select 3)]; publicvariableserver "elanFlamerLog";
        if(_elanFlamingPointsFunc >= _elanFlamingPointsMaxFunc) then {iFlameTooMuch = _stats; publicvariableserver "iFlameTooMuch";};
        _elanFlamingPointsFunc			
    };
    
    _elanFlamingPoints=0;
    _elanFlamingPointsMax=10;
    _elanflamingWords = ["hack","cheat","base cam","base ki","basekil","spawnk","spawn ki","huren","motherfu","fucke","fucki","campe","campi","fick","noob","aimbot"];
    
    while {true} do {
        if(!isNull findDisplay 24) then {
            _blaaa = tolower(ctrlText ((findDisplay 24) displayCtrl 101));
            if(_blaaa != "") then {					
                if( (["admin",_blaaa] call BIS_fnc_inString) ) then {
                    ["RestartWarning","Do you wanna spam us?"] call ExileClient_gui_notification_event_addNotification;
                    (findDisplay 24) closeDisplay 1;
                    _elanFlamingPoints = [_elanFlamingPoints,_elanFlamingPointsMax,2,_blaaa] call _flamulator2000;
                };
                
                {
                    if( ([_x,_blaaa] call BIS_fnc_inString) ) exitWith {
                        playsound "BaDumTss";
                        ["RestartWarning","Aaahhh... Do you wanna flame?"] call ExileClient_gui_notification_event_addNotification;
                        (findDisplay 24) closeDisplay 1;
                        _elanFlamingPoints = [_elanFlamingPoints,_elanFlamingPointsMax,2,_blaaa] call _flamulator2000;				
                    };
                } forEach _elanflamingWords;
            }
        };
        uisleep (0.1);
    };
};


And edit your publicvariable.txt to have a look what they wanna flame and kick them if they flame to much.

//new
7 "" !="elanFlamerLog"
3 "elanFlamerLog"

 

Share this post


Link to post
Share on other sites

performance_please.thumb.png.34b9ecbf12a

Performance doesnt seem to be an issue. I have seen worse scripts and loops running on servers.

Also BEC only filters after you already sent the message. This script jumps in while you are writing the message and it closes the dialog.

The Badwords wont get into your servers chat.

10 checks a second is nothing for your computer.
 

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.