[FilterScript] FuckIt [v1] [Anti Cheat System]
#1

Description: - Anti-Health Cheating (Detects v-0gelz)
- Anti-BannedWeapon Detection (Inventory Check)
- Anti-Spawn Killing
- Anti-DriveBy Abuse
- Anti-Prolong Inactivity (Pausers)
- Anti-Interior Kill
- Clone Detection

include:
PHP Code:
/*
==============================
    FuckIt Anti-Cash-Cheat
        Include File
==============================
*/
#pragma unused EZ_DeleteProperty
#pragma unused EZ_ExistProperty
new cashb[MAX_PLAYERS];
FcukIt_ResetPlayerMoney(playerid)
{
    
ResetPlayerMoney(playerid);
    new 
gptmp[32], id[8], tmpcash[32] = "0";
    
valstr(idplayeridfalse);
    
strins(gptmp"c"032);
    
strins(gptmpid132);
    
EZ_SetProperty(gptmptmpcash);
}
FcukIt_GivePlayerMoney(playeridamount)
{
    
GivePlayerMoney(playeridamount);
    
cashb[playerid] += amount;
    new 
gptmp[32], id[8], tmpcash[32];
    
valstr(idplayeridfalse);
    
strins(gptmp"c"032);
    
strins(gptmpid132);
    
valstr(tmpcash, (strval(EZ_GetProperty(gptmp)) + amount), false);
    
EZ_SetProperty(gptmptmpcash);
}
stock EZ_SetProperty(name[], string[])
{
    
strpack(stringstring256);
    
setproperty(0""hash(name), string);
}
stock EZ_GetProperty(name[])
{
    new 
string[256];
    
getproperty(0""hash(name), string);
    
strunpack(stringstring256);
    return 
string;
}
stock EZ_DeleteProperty(name[])
{
    if(
existproperty(0""hash(name))){
    
deleteproperty(0,"",hash(name));}
    else {
    
printf("<EZ-GSP> Property Does Not Exist (%s)"name);
    }
}
stock EZ_ExistProperty(name[])
{
    if(
existproperty(0""hash(name))) return 1;
    return 
0;
}
stock hash(etmp[])
{
    new 
i;
    new 
s1 1;
    new 
s2 0;
    new 
length=strlen(etmp);
    for (
i=0i<lengthi++)
    {
       
s1 = (s1 etmp[i]) % 65521;
       
s2 = (s2 s1)     % 65521;
     }
    return (
s2 << 16) + s1;

PWN:
PHP Code:
/*
=================================
     FuckIt Anti-Cheat V1
=================================
======================================================
                
        
    - Improved Stability and Efficiency
    - Decreased Chances of False Health-Detection (Paused)
    - Removed Spoof-Detection (Outdated)
    - Intergrated FuckIt++
    - Overhauled Anti-Lagg to increase efficiency
    
======================================================
                       Notes
This filterscript is designed with efficiency, reliability
and stability as core factors.
In my opinion, due to the fact filterscripts are processed
in addition to gamemodes, anticheats often run resource hungry
loops and calculations very often and stability is a well known
issue with Scripts/SA:MP. I have ommited any detection that
isn't accurate enough, too resource hungry or unneccesary.
=======================================================
*/
#include <a_samp>
#include <ezgsp>
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
forward MaxInterval(); aBan(playerid); aKick(playerid); pCheck(); pLoop(); hLoop2(); pausetest(); pauseresult(); hSelect(); pausetest1(); pausetest2(); pausetest3(); vCheck(); cLoop(); //SpoofLoop(playerid, killerid);
// IMPORTANT: Change "50" to your servers set maximum players for MAXIMUM EFFICIENCY
#define MP 50
// IMPORTANT: DECLARE YOUR DESIRED "STUNTCASH" LIMIT
new stuntcash 1999;
#pragma unused EZ_ExistProperty
#pragma unused EZ_DeleteProperty
/*
======================
     Declarations
======================
*/
// Settings
new aWaaCashIncaDbkillsaHealthaCashaDriveaInacaItimecCheck,
hCheckaIkillaSkillaStimeaSlimit/*aSpoof,*/ aCloneaLogaLaggaOnKill;
new 
Float:HealthFloat:HealthBhcStagerp// Health Check
new Float:hxFloat:hyFloat:hzFloat:thxFloat:thyFloat:thz;
new 
Cashb[MP], Cash[MP]; // Cash Check
new dbcount[MP]; // Anti Drive-By-Abuse
new settimer 0;
new 
aWpn1aWpn2aWpn3aWpn4aWpn5aWpn6aWpn7aWpn8aWpn9aWpn10aWpn11aWpn12// Anti-BannedWeapons
new Float:Xb[MP], Float:Yb[MP], Float:Zb[MP], Float:Xa[MP], Float:Ya[MP], Float:Za[MP];
new 
sTime[MP], sCount[MP];
new 
gString[128];
new 
hTIMEcTIMEiTIMEsTIMEwTIME;
new 
Kicks=0Bans=0Disarms=0;
enum CD_ENUM
{
    
PlayerIP[32]
}
new 
CloneData[MP][CD_ENUM];
new 
bWeapons[12];
#pragma unused aWpn1
/*
=================
    Anti-LaGG
=================
*/
new pLimit;
new 
pIntervals;
new 
pTime;
new 
pTolerance;
new 
pWarning;
new 
pWarnings[MP];
/*
======================
         Main
======================
*/
stock PlayerName(playerid)
{
  new 
pName[MAX_PLAYER_NAME];
  
GetPlayerName(playeridpNamesizeof(pName));
  return 
pName;
}
public 
OnFilterScriptInit()
{
    
rConfig();
     
pTime = (pIntervals*2);
    
bWeapons[0] = -1bWeapons[1] = aWpn2bWeapons[2] = aWpn3bWeapons[3] = aWpn4;
    
bWeapons[4] = aWpn5bWeapons[5] = aWpn6bWeapons[6] = aWpn7bWeapons[7] = aWpn8;
    
bWeapons[8] = aWpn9bWeapons[9] = aWpn10bWeapons[10] = aWpn11bWeapons[11] = aWpn12;
    print(
"\n  FuckIt Anti-Cheat V1  by [DRuG]Scarface ");
    print(
"  Loading Configuration......\n");
    print(
"    Configuration: ");
    if(
aWa 0){        print("      |Anti-BWeapons    [Activated]"); }else{ print("      |Anti-BWeapons    [Disabled]"); }
    if(
aHealth 0){  print("      |Anti-HealthHack  [Activated]"); }else{ print("      |Anti-HealthHack  [Disabled]"); }
    if(
aCash 0){    print("      |Anti-MoneyHack   [Activated]"); }else{ print("      |Anti-MoneyHack   [Disabled]"); }
    if(
aDrive 0){   print("      |Anti-DriveBy     [Activated]"); }else{ print("      |Anti-DriveBy     [Disabled]"); }
    if(
aInac 0){    print("      |Anti-Inactivity  [Activated]"); }else{ print("      |Anti-Inactivity  [Disabled]"); }
    if(
aIkill 0){   print("      |Anti-IntKills    [Activated]"); }else{ print("      |Anti-IntKills    [Disabled]"); }
    if(
aSkill 0){   print("      |Anti-SpawnKill   [Activated]"); }else{ print("      |Anti-SpawnKill   [Disabled]"); }
//    if(aSpoof > 0){   print("      |Anti-Spoofing    [Activated]"); }else{ print("      |Anti-Spoofing    [Disabled]"); }
    
if(aClone 0){   print("      |Anti-Cloning     [Activated]"); }else{ print("      |Anti-Cloning     [Disabled]"); }
    if(
aLog 0){     print("      |IP-Log           [Activated]"); }else{ print("      |IP-Log           [Disabled]"); }
    if(
aCash 0){    printf("      |Max-Cash-Inc     [%d]",aCashInc); }
    if(
aDrive 0){   printf("      |Max-DB-Kills     [%d]",aDbkills); }
    if(
aInac 0){    printf("      |Inactive-Time    [%d]",aItime); }
    if(
aHealth 0){  printf("      |CashCheck-Time   [%d]",cCheck); }
    if(
aCash 0){    printf("      |HealthCheck-Time [%d]",hCheck); }
    if(
aSkill 0){   printf("      |Spawn-Kill-Time     [%d]",aStime); }
    if(
aCash 0){    printf("      |Max-Spawn-Kills     [%d]\n",aSlimit); }
    if(
aLagg 0){    print("      |Anti-LaGG        [Activated]"); }else{ print("      |Anti-LaGG        [Disabled]"); }
    
printf("      |Ping Limit = %d",pLimit);
    
printf("      |Check Intervals = %d",pIntervals);
    if(
pWarning == 1)
    {
    
printf("      |Ping Tolerance = %d\n",pTolerance);
    }
    print(
"------------------------------------------------------");
    print(
"          Server Monitored by FuckIt V1");
    print(
"------------------------------------------------------");
    return 
1;
}
public 
OnPlayerDisconnect(playerid)
{
    
dbcount[playerid] = 0;
    
Cashb[playerid] = 0;
    
Cash[playerid] = 0;
    
sTime[playerid] = 0;
    
sCount[playerid] = 0;
    
pWarnings[playerid] = 0;
    
ClearIPData(playerid);
    if(
playerid == rphcStage 0;
    
    
// Cash Detection
    
new gptmp[32], id[8], tmpcash[32] = "0";
    
valstr(idplayeridfalse);
    
strins(gptmp"c"032);
    
strins(gptmpid132);
    
EZ_SetProperty(gptmptmpcash);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    
GetIPData(playerid);
    if(
aLog 0Log(playerid);
    
dbcount[playerid] = 0;
       
pWarnings[playerid] = 0;
    
Xb[playerid]=4000.0Yb[playerid]=4000.0Zb[playerid]=4.0;
    
Cashb[playerid] = 500;
    if(
settimer!=1)
    {
        
SetTimer("MaxInterval",500,1);
        
hTIME = (hCheck*2);
        
cTIME = (cCheck*2);
        
iTIME = (aItime*2);
        
wTIME 9;
        
sTIME 2;
        
settimer=1;
    }
    
SendClientMessage(playerid0xFFFF00AA"*** Server Monitored by FuckIt V1! [by[DRuG]Scarface]");
    if(
pWarning == && aLagg != 0)
    {
    
format(gStringsizeof(gString), "Ping Limit: %dms"pLimit);
    
SendClientMessage(playerid0xFFFF00AAgString);
    }
    if(
pWarning && aLagg != 0)
    {
    
format(gStringsizeof(gString), "Ping Limit: %dms Tolerance: %dms"pLimitpTolerance);
    
SendClientMessage(playerid0xFFFF00AAgString);
    }
    return 
1;
}
public 
MaxInterval()
{
        
hTIME--; cTIME--; iTIME--; sTIME--; pTime--; wTIME--;
        if(
aHealth && hTIME == 0){ hSelect(); hTIME = (hCheck*2);} /*print("hLoop Started...");*/
        
if(aWa && wTIME == 0){ rWeapon(); wTIME = (hCheck*2);} /*print("wLoop Started...");*/
        
if(aCash && cTIME == 0){ cLoop(); cTIME = (cCheck*2);} /*print("cLoop Started...");*/
        
if(aInac && iTIME == 0){ iLoop(); iTIME = (aItime*2);} /*print("iLoop Started...");*/
        
if(aSkill && sTIME == 0){ sLoop(); sTIME 2;} /*print("sLoop Started...");*/
        
if(pTime == 0){ pLoop(); pTime = (pIntervals*2);} /*print("pingLoop Started...");*/
}
public 
OnPlayerSpawn(playerid)
{
    
sTime[playerid] = aStime;
    return 
1;
}
stock ActivePlayerCount()
{
    new 
players=0;
    for(new 
pc=0pc<MPpc++)
    {
        if(
IsPlayerConnected(pc))
        {
            
players++;
        }
    }
    return 
players;
}
/*
====================
    Health Check
====================
*/
stock hSelect()
{
    if(
ActivePlayerCount() != 0)
    {
         
rp random(MP);
        if(
IsPlayerConnected(rp))
        {
            
hcStage 0;
            
Health 0.0;
            
HealthB 0.0;
            
hcStage 1;
            
pausetest();
        }
        else
        {
            
hSelect();
            return 
1;
        }
    }
    return 
1;
}
public 
pausetest()
{
    if(
IsPlayerConnected(rp) && hcStage == && CorrectState(rp))
    {
        
GetPlayerPos(rphxhyhz);
        
SetTimer("pausetest1"1200,0);
        return 
1;
    }
    return 
0;
}
public 
pausetest1()
{
    if(
IsPlayerConnected(rp) && hcStage == && CorrectState(rp))
    {
        
hcStage 2;
        
GetPlayerPos(rpthxthythz);
        if(
thx != hx || thy != hy || thz != hz)
        {
            
pauseresult();
        }
        else {
        
hcStage 0;
        }
    }
    return 
0;
}
public 
pauseresult()
{
        if(
IsPlayerConnected(rp) && hcStage == 2)
        {
            new 
Float:hx2Float:hy2Float:hz2;
            
GetPlayerPos(rphx2hy2hz2);
            if(
hx2 == hx && hy2 == hy && hz == hz2)
            {
                
hcStage 0;
                return 
1;
            }
            else
            {
                   if(
aHealth 0)
                {
                    if(
IsPlayerConnected(rp) && CorrectState(rp))
                    {
                        new 
Float:tmpVal;
                        
GetPlayerHealth(rptmpVal);
                        
HealthB tmpVal;
                        
SetPlayerHealth(rp, (tmpVal-1.0));
                        
hcStage 3;
                          
SetTimer("hLoop2",1000,0);
                    }
                }
            }
        }
        return 
0;
}
    
public 
hLoop2()
{
        if(
IsPlayerConnected(rp) && hcStage == && CorrectState(rp))
        {
            
GetPlayerHealth(rpHealth);
            new 
Float:hx2Float:hy2Float:hz2;
            
GetPlayerPos(rphx2hy2hz2);
            if(
Health == HealthB && CorrectState(rp) && HealthB != 0.0)
            {
                {
                if(
aHealth == 1)
                {
                     
FcukKick(rp"Health Cheating");
                }
                else if(
aHealth == 2)
                {
                    
FcukBan(rp"Health Cheating");
                }
                }
                return 
1;
            }
            else {
               new 
Float:testh2;
            
GetPlayerHealth(rp,testh2);
            
SetPlayerHealth(rp,(testh2+1.0));
            
hcStage 0;
            }
        }
        return 
0;
}
stock CorrectState(playerid)
{
    if(
GetPlayerState(playerid) == 0) return 0;
    if(
GetPlayerState(playerid) == 7) return 0;
    if(
GetPlayerState(playerid) == 8) return 0;
    if(
GetPlayerState(playerid) == 9) return 0;
    return 
1;
}
/*
====================
    Cash Check
====================
*/
public cLoop()
{
    for(new 
c=0;c<MAX_PLAYERS;c++)
    {
        new 
rCash GetPlayerMoney(c);
        if(
IsPlayerConnected(c))
        {
            new 
gptmp[32], id[8], trans[32];
            
valstr(idcfalse);
            
strins(gptmp"c"032);
            
strins(gptmpid132);
            new 
CashCount strval(EZ_GetProperty(gptmp));
            if(
rCash != CashCount)
            {
                new 
tcash2;
                
tcash2 rCash-CashCount;
                if(
tcash2 stuntcash && CashCount rCash)
                {
                    if(!
IsPlayerGambling(c))
                    {
                        if(
rCash CashCount)
                        {
                            if(
aCash == 1)
                            {
                                 
FcukKick(c"Money Cheating");
                            }
                            else if(
aCash == 2)
                            {
                                
FcukBan(c"Money Cheating");
                            }
                        }
                        else {
                        
valstr(idcfalse);
                        
strins(gptmp"c"032);
                        
strins(gptmpid132);
                        
valstr(transrCashfalse);
                        
EZ_SetProperty(gptmptrans);
                        }
                    }
                    else {
                    
valstr(idcfalse);
                    
strins(gptmp"c"032);
                    
strins(gptmpid132);
                    
valstr(transrCashfalse);
                    
EZ_SetProperty(gptmptrans);
                    }
                 }
                else {
                
valstr(idcfalse);
                
strins(gptmp"c"032);
                
strins(gptmpid132);
                
valstr(transrCashfalse);
                
EZ_SetProperty(gptmptrans);
                }
             }
        }
    }
}
IsPlayerGambling(playerid)
{
    new 
Float:bX;
    new 
Float:bY;
    new 
Float:bZ;
    
GetPlayerPos(playeridFloat:bXFloat:bYFloat:bZ);
    if((
Float:bX 1925.1527 && Float:bX 1975.8721) && (Float:bY 968.2526 && Float:bY 1052.2089)){
    return 
1;
    }
    if((
Float:bX 2161.6980 && Float:bX 2281.1763) && (Float:bY 1557.5767 && Float:bY 1630.5237)){
    return 
1;
    }
    return 
0;
}
/*
========================
    Inactivity Check
========================
*/
stock iLoop()
{
    for(new 
i=0;i<MP;i++)
    {
        if(
IsPlayerConnected(i))
        {
            
GetPlayerPos(iFloat:Xa[i], Float:Ya[i], Float:Za[i]);
            if((
Float:Xa[i] == Float:Xb[i]) && (Float:Ya[i] == Float:Yb[i]))
            {
                if(
aInac == 1)
                {
                    
FcukKick(i"Prolonged Inactivity");
                }
                else if(
aInac == 2)
                {
                    
FcukBan(i"Prolonged Inactivity");
                }
            }
            else {
            
Xb[i] = Xa[i];
            
Yb[i] = Ya[i];
            }
        }
    }
}
/*
========================
    S-Kill Detection
========================
*/
stock sLoop()
{
    for(new 
s=0;s<MP;s++)
    {
        if(
IsPlayerConnected(s))
        {
             if(
sTime[s] > 0)
            {
                
sTime[s]--;
            }
        }
    }
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    if(
killerid != INVALID_PLAYER_ID)
    {
      
/*  if(aSpoof > 0)
        {
            if(IsPlayerConnected(killerid) && IsPlayerConnected(playerid) && reason != INVALID_PLAYER_ID)
            {
                SetTimerEx("SpoofLoop", 500, 0, "i", playerid, killerid);
                print("SpoofLoop Started...");
             }
        }*/
        
if(aDrive 0)
        {
            if(
IsPlayerInAnyVehicle(killerid) && reason != WEAPON_VEHICLE)
            {
                
dbcount[killerid]++;
            }
            else if(
IsPlayerInAnyVehicle(killerid) == 0)
            {
                
dbcount[killerid] = 0;
            }
        
            if(
dbcount[killerid] >= aDbkills)
            {
                if(
aDrive == 1)
                {
                    
FcukKick(killerid"Repeatative Drive-By's");
                    
dbcount[killerid] = 0;
                }
                else if(
aDrive == 2)
                {
                    
FcukBan(killerid"Repeatative Drive-By's");
                    
dbcount[killerid] = 0;
                }
                else if(
aDrive == 3)
                {
                       
FcukDisarm(killerid"Repeatative Drive-By's");
                         
dbcount[killerid] = 0;
                }
            }
        }
        if(
aIkill 0)
        {
            if(
IsPlayerConnected(killerid))
            {
                if(
GetPlayerInterior(killerid) != 0)
                {
                    if(!
IsPlayerInAnyVehicle(killerid))
                    {
                        if(
aIkill == 1)
                        {
                            
FcukKick(killerid"Interior Weapon Use");
                        }
                        else if(
aIkill == 2)
                        {
                            
FcukBan(killerid"Interior Weapon Use");
                        }
                    }
                }
            }
        }
        if(
aSkill 0)
        {
            if(
IsPlayerConnected(playerid) && IsPlayerConnected(killerid))
            {
                    if(
sTime[playerid] > 0)
                {
                    
sCount[killerid]++;
                    if(
sCount[killerid] >= aSlimit)
                    {
                        if(
aSkill == 1)
                        {
                            
FcukKick(killerid"Repeatative Spawn Killing");
                            
sCount[killerid] = 0;
                        }
                        else if(
aSkill == 2)
                        {
                            
FcukBan(killerid"Repeatative Spawn Killing");
                            
sCount[killerid] = 0;
                        }
                        else if(
aSkill == 3)
                        {
                            
FcukDisarm(killerid"Repeatative Spawn Killing");
                            
sCount[killerid] = 0;
                        }
                    }
                }
              }
           }
        
        if(
aWa 0)
        {
                if(
reason == aWpn1 || reason == aWpn2 || reason == aWpn3 || reason == aWpn4 || reason == aWpn5 || reason == aWpn6 || reason == aWpn7 || reason == aWpn8 || reason == aWpn9 || reason == aWpn10 || reason == aWpn11 || reason == aWpn12)
                {
                    
format(gStringsizeof(gString), "Used a Banned Weapon (%s)"reason);
                    if(
aOnKill == 1)
                    {
                        
FcukKick(killeridgString);
                    }
                    else if(
aOnKill == 2)
                    {
                        
FcukBan(killeridgString);
                    }
                }
        }
    }
    return 
1;
}
/*
====================
    Spoof Check
====================
*/
/*
public SpoofLoop(playerid, killerid)
{
    new Float:spoofhealth;
    spoofhealth = GetPlayerHealth(playerid, spoofhealth);
    if(spoofhealth > 5.0)
    {
        if(aSpoof == 1)
          {
               FcukKick(playerid, "ID Spoofing");
            return 1;
        }
        else if(aSpoof == 2)
        {
               FcukBan(playerid, "ID Spoofing");
               return 1;
        }
    }
    return 1;
}*/
            
/*
====================
    Weapon Check
====================
*/
rWeapon()
{
    new 
ra random(MP);
    if(
ActivePlayerCount() != 0)
    {
        if(
IsPlayerConnected(ra))
        {
            
WeaponCheck(ra);
        }
        else
        {
            
rWeapon();
        }
    }
    return 
1;
}
stock WeaponCheck(playerid)
{
    if(
IsPlayerConnected(playerid))
    {
         for(new 
slot=0;slot<14;slot++)
        {
            new 
tmpwpnammo;
            
GetPlayerWeaponData(playeridslottmpwpnammo);
             for(new 
s=0;s<12;s++)
            {
                if(
tmpwpn == bWeapons[s])
                   {
                    new 
wname[32];
                        
GetWeaponName(tmpwpnwnamesizeof(wname));
                       
format(gStringsizeof(gString), "'s inventory contains a Banned Weapon (%s)"wname);
                        
                       if(
aWa == 1)
                    {
                        
FcukKick(playeridgString);
                        return 
1;
                    }
                    else if(
aWa == 2)
                    {
                        
FcukBan(playeridgString);
                        return 
1;
                    }
                }
            }
        }
     }
    return 
1;
}
/*
====================
    Clone Check
====================
*/
GetIPData(playerid)
{
    new 
tmpip[32];
    
GetPlayerIp(playeridtmpip,32);
    
strins(CloneData[playerid][PlayerIP],tmpip,0,32);
    
CloneCheck(playerid);
    return 
1;
}
ClearIPData(playerid)
{
    
strdel(CloneData[playerid][PlayerIP],0,32);
}
CloneCheck(playerid)
{
    if(
aClone 0)
    {
         for(new 
c=0;c<MP;c++)
        {
            if(
playerid != c)
            {
                 new 
tmpIP[32];
                
GetPlayerIp(playeridtmpIP,32);
                if(
CloneData[c][PlayerIP] == strval(tmpIP))
                {
                    
//Detected Clone
                    
if(aClone == 1)
                    {
                        
format(gStringsizeof(gString), "<FuckIt> Detected %s and %s are Clones (Warned)"PlayerName(playerid),PlayerName(c));
                        
SendClientMessageToAll(COLOR_YELLOWgString);
                    }
                    else if(
aClone == 2)
                    {
                           
format(gStringsizeof(gString), "is a Clone of %s",PlayerName(playerid));
                        
FcukKick(playeridgString);
                    }
                }
            }
        }
    }
}
            
/*
===================
  Kick/Ban Timers
===================
*/
public aBan(playerid)
{
    if(
IsPlayerConnected(playerid))
    {
         
Ban(playerid);
    }
}
public 
aKick(playerid)
{
    if(
IsPlayerConnected(playerid))
    {
         
Kick(playerid);
    }
}
/*
===================
 Kick/Ban Messages
===================
*/
FcukKick(playeridmessage[])
{
Kicks++;
format(gStringsizeof(gString),"<FuckIt> Detected %s %s (Kicked)"PlayerName(playerid), message);
SendClientMessageToAll(COLOR_YELLOWgString);
SaveKDetails(playeridmessage);
SetTimerEx("aKick",750,false,"i",playerid);
printf("<FuckIt> Successful Kick (%s) - %s"PlayerName(playerid), message);
}
FcukBan(playeridmessage[])
{
Bans++;
format(gStringsizeof(gString),"<FuckIt> Detected %s %s (Banned)"PlayerName(playerid), message);
SendClientMessageToAll(COLOR_YELLOWgString);
SaveBDetails(playeridmessage);
SetTimerEx("aBan",750,false,"i",playerid);
printf("<FuckIt> Successful Ban (%s) - %s"PlayerName(playerid), message);
}
FcukDisarm(playeridmessage[])
{
Disarms++;
format(gStringsizeof(gString),"<FuckIt> Detected %s %s (Disarmed)"PlayerName(playerid), message);
SendClientMessageToAll(COLOR_YELLOWgString);
ResetPlayerWeapons(playerid);
}
/*
=========================
     Config Function
=========================
*/
rConfig()
{
    new 
File:fhandle;
    new 
cname[64];
    new 
temp[64];
    new 
value[64];
    
fhandle fopen("ficonfig.txt",io_readwrite);
    while(
fread(fhandle,temp,sizeof(temp),false))
        {
            
cname strtok(temp,0);
            
value strtok(temp,(strlen(cname)+1));
            if(
strcmp(cname,"Weapon1",true) == 0aWpn1 strval(value);
            else if(
strcmp(cname,"Weapon2",true) == 0aWpn2 strval(value);
            else if(
strcmp(cname,"Weapon3",true) == 0aWpn3 strval(value);
            else if(
strcmp(cname,"Weapon4",true) == 0aWpn4 strval(value);
            else if(
strcmp(cname,"Weapon5",true) == 0aWpn5 strval(value);
            else if(
strcmp(cname,"Weapon6",true) == 0aWpn6 strval(value);
            else if(
strcmp(cname,"Weapon7",true) == 0aWpn7 strval(value);
            else if(
strcmp(cname,"Weapon8",true) == 0aWpn8 strval(value);
            else if(
strcmp(cname,"Weapon9",true) == 0aWpn9 strval(value);
            else if(
strcmp(cname,"Weapon10",true) == 0aWpn10 strval(value);
            else if(
strcmp(cname,"Weapon11",true) == 0aWpn11 strval(value);
            else if(
strcmp(cname,"Weapon12",true) == 0aWpn12 strval(value);
            else if(
strcmp(cname,"Max-Cash-Increase",true) == 0aCashInc strval(value);
            else if(
strcmp(cname,"DB-Kills",true) == 0aDbkills strval(value);
            else if(
strcmp(cname,"A-Health",true) == 0aHealth strval(value);
            else if(
strcmp(cname,"A-Cash",true) == 0aCash strval(value);
            else if(
strcmp(cname,"A-DriveBy",true) == 0aDrive strval(value);
            else if(
strcmp(cname,"A-Inactivity",true) == 0aInac strval(value);
            else if(
strcmp(cname,"A-BWeapons",true) == 0aWa strval(value);
            else if(
strcmp(cname,"Inactive-Period",true) == 0aItime strval(value);
            else if(
strcmp(cname,"hCheck-Time",true) == 0hCheck strval(value);
            else if(
strcmp(cname,"cCheck-Time",true) == 0cCheck strval(value);
            else if(
strcmp(cname,"A-InteriorKill",true) == 0aIkill strval(value);
            else if(
strcmp(cname,"A-SpawnKill",true) == 0aSkill strval(value);
            else if(
strcmp(cname,"Spawn-Kill-Time",true) == 0aStime strval(value);
            else if(
strcmp(cname,"Max-Spawn-Kills",true) == 0aSlimit strval(value);
//            else if(strcmp(cname,"A-Spoofing",true) == 0) aSpoof = strval(value);
            
else if(strcmp(cname,"A-Cloning",true) == 0aClone strval(value);
            else if(
strcmp(cname,"Log-Enabled",true) == 0aLog strval(value);
            else if(
strcmp(cname,"Ping-Limit",true) == 0pLimit strval(value);
            else if(
strcmp(cname,"Ping-Intervals",true) == 0pIntervals strval(value);
            else if(
strcmp(cname,"Ping-Warning(0/1)",true) == 0pWarning strval(value);
            else if(
strcmp(cname,"Ping-Tolerance",true) == 0pTolerance strval(value);
            else if(
strcmp(cname,"A-Lagg",true) == 0aLagg strval(value);
            else if(
strcmp(cname,"A-OnKill",true) == 0aOnKill strval(value);
        }
    
fclose(fhandle);
    return 
1;
}
/*
========================
      Save Details
========================
*/
Log(playerid)
{
     new 
File:fhandle;
    new 
temp[32];
    new 
IP[32], tIP[32];
    
GetPlayerIp(playeridIPsizeof(IP));
    
fhandle fopen("FcukIPlog.txt",io_readwrite);
    while(
fread(fhandle,temp,sizeof(temp),false))
    {
            
tIP strtok(temp,0);
            if(
strcmp(tIP,IP,true,32)==0)
            {
                
fclose(fhandle);
                return 
0;
            }
            else
            {
            
format(temp,sizeof(temp),"%s %s\r\n",IP,PlayerName(playerid));
            
fwrite(fhandle,temp);
            
fclose(fhandle);
            }
    }
    return 
1;
}
SaveKDetails(playeridreason[])
{
new 
File:fhandle;
new 
monthdayyearhourminutesecond;
getdate(yearmonthday);
gettime(hourminutesecond);
fhandle fopen("Fcukkick.txt",io_append);
format(gString,sizeof(gString),"%s %s Date: %d/%d/%d Time: %d:%d\r\n",PlayerName(playerid),reason,day,month,year,hour,minute);
fwrite(fhandle,gString);
fclose(fhandle);
}
SaveBDetails(playeridreason[])
{
new 
File:fhandle;
new 
monthdayyearhourminutesecond;
getdate(yearmonthday);
gettime(hourminutesecond);
fhandle fopen("Fcukban.txt",io_append);
format(gString,sizeof(gString),"%s %s Date: %d/%d/%d Time: %d:%d\r\n",PlayerName(playerid),reason,day,month,year,hour,minute);
fwrite(fhandle,gString);
fclose(fhandle);
}
/*
========================
        Commands
========================
*/
public OnPlayerCommandText(playeridcmdtext[])
{
    
dcmd(fhealth,7,cmdtext);
    
dcmd(fcash,5,cmdtext);
    
dcmd(finactive,9,cmdtext);
    
dcmd(fbweapons,9,cmdtext);
    
dcmd(fskill,6,cmdtext);
    
dcmd(fclone,6,cmdtext);
    
dcmd(frestart,8,cmdtext);
    
dcmd(fshutdown,9,cmdtext);
    
dcmd(fhelp,5,cmdtext);
    
dcmd(fdriveby,8,cmdtext);
    
dcmd(FuckIt,6,cmdtext);
    return 
0;
}
/*
========================
   Command Functions
========================
*/
stock dcmd_fhealth(playeridparams[])
{
#pragma unused params
        
if(IsPlayerAdmin(playerid))
        {
            if(
aHealth == 1)
            {
            
aHealth=0;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Health Check Shutdown");
            }
            else {
            
aHealth=1;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Health Check Activated");
            }
        }
        return 
1;
    }
    
stock dcmd_fcash(playeridparams[])
{
#pragma unused params
        
if(IsPlayerAdmin(playerid))
        {
            if(
aCash == 1)
            {
            
aCash=0;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Cash Check Shutdown");
            }
            else {
            
aCash=1;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Cash Check Activated");
            }
        }
        return 
1;
     }
     
stock dcmd_finactive(playerid,params[])
{
#pragma unused params
        
if(IsPlayerAdmin(playerid))
        {
            if(
aInac == 1)
            {
            
aInac=0;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Inactivity Check Shutdown");
            }
            else {
            
aInac=1;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Inactivity Check Activated");
            }
        }
        return 
1;
     }
stock dcmd_fbweapons(playerid,params[])
{
#pragma unused params
        
if(IsPlayerAdmin(playerid))
        {
            if(
aWa == 1)
            {
            
aWa=0;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Anti-Banned Weapons Shutdown");
            }
            else {
            
aWa=1;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Anti-Banned Weapons Activated");
            }
        }
        return 
1;
     }
stock dcmd_fskill(playeridparams[])
{
#pragma unused params
        
if(IsPlayerAdmin(playerid))
        {
            if(
aSkill == 1)
            {
            
aSkill=0;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Anti-Spawn-Killing Shutdown");
            }
            else {
            
aSkill=1;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Anti-Spawn-Killing Activated");
            }
        }
        return 
1;
     }
     
stock dcmd_fclone(playeridparams[])
{
#pragma unused params
        
if(IsPlayerAdmin(playerid))
        {
            if(
aClone == 1)
            {
            
aClone=0;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Anti-Clone-Detection Shutdown");
            }
            else {
            
aClone=1;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Anti-Clone-Detection Activated");
            }
        }
        return 
1;
     }
stock dcmd_frestart(playeridparams[])
{
#pragma unused params
        
if(IsPlayerAdmin(playerid))
        {
            
rConfig();
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> FuckIt Anti-Cheat Successfully Restarted!");
        }
        return 
1;
}
stock dcmd_fshutdown(playeridparams[])
{
#pragma unused params
        
if(IsPlayerAdmin(playerid))
        {
            
aHealth=0aCash=0aInac=0aSkill=0aIkill=0aWa=0aDrive=0;
            
aWa=0/*aSpoof=0,*/ aClone=0aLog=0aLagg=0;
            
SendClientMessage(playeridCOLOR_YELLOW"<FuckIt> Emergency Shutdown Successful");
        }
        return 
1;
    }
    
stock dcmd_fhelp(playeridparams[])
{
#pragma unused params
        
if(IsPlayerAdmin(playerid))
        {
            
SendClientMessage(playeridCOLOR_YELLOW"FuckIt V1 Administrator Command List");
            
SendClientMessage(playeridCOLOR_YELLOW"Main: /frestart, /fshutdown, /FuckIt");
            
SendClientMessage(playeridCOLOR_YELLOW"Toggle Checks:");
            
SendClientMessage(playeridCOLOR_YELLOW"/fclone, /fskill, /fbweapons, /finactive");
            
SendClientMessage(playeridCOLOR_YELLOW"/fdriveby, /fhealth, /fcash");
        }
        return 
1;
    }
stock dcmd_FuckIt(playeridparams[])
{
#pragma unused params
        
if(IsPlayerConnected(playerid))
        {
        
SendClientMessage(playeridCOLOR_RED">> This server is Monitored by FuckIt Anti-Cheat");
        
SendClientMessage(playeridCOLOR_YELLOW">> Version: V1 [Build 27]");
        
format(gStringsizeof(gString), ">> Session:  Kicks: %d  Bans: %d  Disarms:%d"KicksBansDisarms);
        
SendClientMessage(playeridCOLOR_YELLOWgString);
        
SendClientMessage(playeridCOLOR_YELLOW">> Coded by [DRuG]Scarface);
         }
        return 1;
}
    
stock dcmd_fdriveby(playerid, params[])
{
#pragma unused params
        if(IsPlayerConnected(playerid) && IsPlayerAdmin(playerid))
        {
            if(aDrive == 1)
            {
            aDrive=0;
            SendClientMessage(playerid, COLOR_YELLOW, "
<FuckItAnti-Drive-By Shutdown");
            return 1;
            }
            else {
            aDrive=1;
            SendClientMessage(playerid, COLOR_YELLOW, "
<FuckItAnti-Drive-By Activated");
            }
        }
        return 1;
    }
/*
=================
    Anti-LaGG
=================
*/
public pLoop()
{
    for(new i=0;i<MP;i++)
    {
        if(IsPlayerConnected(i))
        {
            new tPing = GetPlayerPing(i);
            new PingL = (pLimit + pTolerance);
            if((tPing > pLimit) && (tPing > PingL) && pWarning > 0)
            {
                FcukKick(i, "
High Ping");
            }
            if((tPing > pLimit) && (pWarning < 1))
             {
                FcukKick(i, "
High Ping");
            }
            if((tPing <= PingL) && (tPing > pLimit))
            {
                if(pWarnings[i] < 2)
                {
                    pWarnings[i]++;
                    format(gString, sizeof(gString), "
<FuckItWarningYour ping is close to the Limit of %(%d/3)", pLimit, pWarnings[i]);
                    SendClientMessage(i, 0xFFFF00AA, gString);
                }
                else {
                SendClientMessage(i, 0xFFFF00AA, "
<FuckItYou have reached your Third Warning!");
                FcukKick(i, "
High Ping");
                pWarnings[i] = 0;
                }
            }
        }
    }
}
/*
========================
     String Defines
========================
*/
strtok(const string[],valve)
{
    new index=valve;
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;

Regards.
NOTE:
This is not mine. just translated it and want to show you it.
Again THIS IS NOT MINE!
Reply
#2

This isn't made by you. Add the credits or risk being banned.
Reply
#3

Quote:
Originally Posted by Jernu
View Post
This isn't made by you. Add the credits or risk being banned.
Credits were they and they will be there.
I never said That i made it.
I never stole credit with this..
Reply
#4

Quote:
Originally Posted by Luxorz
View Post
Credits were they and they will be there.
I never said That i made it.
I never stole credit with this..
So you translated this? From where exactly?
Reply
#5

Show us some example callbacks please. much better if there is a callback to those people will use as a #include
Reply
#6

Name really sounds proffessional.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)