Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- .:: Hack Fighter AntiCheat ::.
- .:: Coded by Homer ::.
- .:: Traduzido Por [BC]Scooby ::.
- .:: 2008 ::.
- .:: All Rights Reserved ::.
- */
- #include <a_samp>
- #include <HFunc>
- #define FILTERSCRIPT
- #define ORANGE 0xFF8C00AA
- #define GREEN 0x33AA33AA
- #define YELLOW 0xFFFF00AA
- #define HOMER 0xFF0000AA
- #define BLUE 0x33CCFFAA
- #define ABLUE 0x2641FEAA
- new MaxPing;
- new IsPlayerSpawned[MAX_PLAYERS];
- forward CheckPing();
- forward CheckHacks();
- public OnFilterScriptInit()
- {
- print("\n-------------LOADING------------------");
- print(" ANT HACK MATA MATA 2012");
- print("--------------------------------------\n");
- SetTimer("CheckHacks",2000,1);
- SetTimer("CheckPing",5000,1);
- MaxPing = 99999999;
- if(!fexist("hf.txt"))
- {
- print("AVISO! Arquivo hf.txt Foi Passado Para A Pasta Scriptfiles!");
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n-------------UNLOADING----------------");
- print(" Mata-Mata 2012! Ant Hack!");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- IsPlayerSpawned[playerid] = 0;
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- IsPlayerSpawned[playerid] = 1;
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new pName[MAX_PLAYER_NAME];
- new kName[MAX_PLAYER_NAME];
- new string[256];
- GetPlayerName(killerid, kName, sizeof(kName));
- GetPlayerName(playerid, pName, sizeof(pName));
- if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
- {
- format(string,256,"[Ant-Hack] %s[ID:%d] Matou %s[ID:%d] Com Drive-By!",kName,killerid,pName,playerid);
- KickMessage(string);
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new string[256];
- new tmp[256], cmd[256], idx;
- cmd = strtok(cmdtext, idx);
- new pName[MAX_PLAYER_NAME];
- if(strcmp(cmd, "/setarping",true ) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,ORANGE,"[Ant-Hack] USAGE: /setarping [MaxPing]");
- return 1;
- }
- if(strval(tmp) < 30 || strval(tmp) > 2000)
- {
- SendClientMessage(playerid,ORANGE,"[Ant-Hack] ERRO! Minimo é 30 e o Maximo é 2000!");
- return 1;
- }
- MaxPing = strval(tmp);
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string,256,"[Ant-Hack] %d[ID:%d] Setou o Ping Maximo Para %d!",pName,playerid,MaxPing);
- SendClientMessageToAll(HOMER,string);
- }
- }else{
- SendClientMessage(playerid,ORANGE,"[Ant-Hack] Você não é admin!");
- return 1;
- }
- return 1;
- }
- return 0;
- }
- public CheckPing()
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(GetPlayerPing(i) >= MaxPing && IsPlayerSpawned[i] == 1)
- {
- new Year,Month,Day;
- new Hour,Min,Sec;
- new pName[MAX_PLAYER_NAME];
- new string[256];
- getdate(Year,Month,Day);
- gettime(Hour,Min,Sec);
- GetPlayerName(i, pName, sizeof(pName));
- format(string,256,"[Ant-Hack] %s[ID:%d] foi kickado. Motivo: Ping Alto (Maximo: %d)",pName,i,MaxPing);
- SendClientMessageToAll(HOMER,string);
- format(string,256,"%s[ID:%d] foi kickado - %d/%d/%d há %d:%d e %d segundos",pName,i,Day,Month,Year,Hour,Min,Sec);
- KickMessage(string);
- Kick(i);
- }
- }
- }
- }
- public CheckHacks()
- {
- new pName[MAX_PLAYER_NAME];
- new string[256];
- new Float:HP,Float:ARM,Float:VehHP;
- new Ammo,VID,Money;
- new Year,Month,Day;
- new Hour,Min,Sec;
- for(new i; i < MAX_PLAYERS; i++)
- {
- GetPlayerHealth(i,HP);
- GetPlayerArmour(i,ARM);
- GetVehicleHealth(VID,VehHP);
- Ammo = GetPlayerAmmo(i);
- VID = GetPlayerVehicleID(i);
- Money = GetPlayerMoney(i);
- getdate(Year,Month,Day);
- gettime(Hour,Min,Sec);
- if(IsPlayerConnected(i))
- {
- if(GetPlayerWeapon(i) == 38) //Minigun
- {
- GetPlayerName(i, pName, sizeof(pName));
- format(string,256,"[Ant-Hack] %s[ID:%d] Foi Banido. Motivo: Arma Proibida (Minigun - %d Ammo)",pName,i,Ammo);
- SendClientMessageToAll(HOMER,string);
- format(string,256,"%s[ID:%d] Foi Banido - %d/%d/%d há %d:%d e %d segundos",pName,i,Day,Month,Year,Hour,Min,Sec);
- KickMessage(string);
- if(i == i) return 0;
- Ban(i);
- }
- if(GetPlayerWeapon(i) == 40) //Detonator
- {
- GetPlayerName(i, pName, sizeof(pName));
- format(string,256,"[Ant-Hack] %s[ID:%d] Foi Banido. Motivo: Arma Proibida (Detonador - %d Ammo)",pName,i,Ammo);
- SendClientMessageToAll(HOMER,string);
- format(string,256,"%s[ID:%d] Foi Banido - %d/%d/%d há %d:%d e %d segundos",pName,i,Day,Month,Year,Hour,Min,Sec);
- KickMessage(string);
- Ban(i);
- }
- if(GetPlayerWeapon(i) == 36) //RPG
- {
- GetPlayerName(i, pName, sizeof(pName));
- format(string,256,"[Ant-Hack] %s[ID:%d] Foi Banido. Motivo: Arma Proibida (Bazooka Teleguiada - %d Ammo)",pName,i,Ammo);
- SendClientMessageToAll(HOMER,string);
- format(string,256,"%s[ID:%d] Foi Banido - %d/%d/%d há %d:%d e %d segundos",pName,i,Day,Month,Year,Hour,Min,Sec);
- KickMessage(string);
- Ban(i);
- }
- if(GetPlayerWeapon(i) == 35) //Rocket Launcher
- {
- GetPlayerName(i, pName, sizeof(pName));
- format(string,256,"[Ant-Hack] %s[ID:%d] Foi Banido. Motivo: Arma Proibida (Bazooka - %d Ammo)",pName,i,Ammo);
- SendClientMessageToAll(HOMER,string);
- format(string,256,"%s[ID:%d] Foi Banido - %d/%d/%d há %d:%d e %d segundos",pName,i,Day,Month,Year,Hour,Min,Sec);
- KickMessage(string);
- Ban(i);
- }
- if(GetPlayerWeapon(i) == 37) //Flame-Tower
- {
- GetPlayerName(i, pName, sizeof(pName));
- format(string,256,"[Ant-Hack] %s[ID:%d] Foi Banido. Motivo: Arma Proibida (Lança-Chamas - %d Ammo)",pName,i,Ammo);
- SendClientMessageToAll(HOMER,string);
- format(string,256,"%s[ID:%d] Foi Banido - %d/%d/%d há %d:%d e %d segundos",pName,i,Day,Month,Year,Hour,Min,Sec);
- KickMessage(string);
- Ban(i);
- }
- if(GetPlayerSpecialAction(i) == 2) //JetPack
- {
- GetPlayerName(i, pName, sizeof(pName));
- format(string,256,"[HackFighter] %s[ID:%d] Foi Banido. Motivo: Jet Pack",pName,i);
- SendClientMessageToAll(HOMER,string);
- format(string,256,"%s[ID:%d] Foi Banido - %d/%d/%d Há %d:%d e %d Segundos",pName,i,Day,Month,Year,Hour,Min,Sec);
- KickMessage(string);
- Ban(i);
- }
- if(HP > 101) //GodMode - Len ak má health nad 100 - Nepoužíva /god
- {
- GetPlayerName(i, pName, sizeof(pName));
- format(string,256,"[HackFighter] %s[ID:%d] Foi Banido. Motivo: GOD (%d HP)",pName,i,HP);
- SendClientMessageToAll(HOMER,string);
- format(string,256,"%s[ID:%d] Foi Banido - %d/%d/%d Há %d:%d e %d segundos",pName,i,Day,Month,Year,Hour,Min,Sec);
- KickMessage(string);
- Ban(i);
- }
- if(Ammo > 100001) //Viac ako 100000 Ammo - Prenastavte si ako potrebujete
- {
- GetPlayerName(i, pName, sizeof(pName));
- format(string,256,"[HackFighter] %s[ID:%d] Foi Banido. Motivo: Munição Hack (%d Ammo)",pName,i,Ammo);
- SendClientMessageToAll(HOMER,string);
- format(string,256,"%s[ID:%d] Foi Banido - %d/%d/%d Há %d:%d e %d segundos",pName,i,Day,Month,Year,Hour,Min,Sec);
- KickMessage(string);
- Ban(i);
- }
- if(GetPlayerMoney(i) == 99999999) //Money Cheat - Taký pokus xD
- {
- format(string,256,"[HackFighter] %s[ID:%d] Foi Banido. Motivo: Dinheiro Hack ($%d)",pName,i,Money);
- SendClientMessageToAll(HOMER,string);
- format(string,256,"%s[ID:%d] Foi Banido - %d/%d/%d Há %d:%d e %d segundos",pName,i,Day,Month,Year,Hour,Min,Sec);
- KickMessage(string);
- Ban(i);
- }
- if(VehHP > 1000) //Auto má viac healthu ako 1000 - Maximum
- {
- RemovePlayerFromVehicle(i);
- DestroyVehicle(VID); //Auto sa proste znièí, pretože sa nevie ktorý cheater to auto urobil
- }
- }
- }
- return 1;
- }
- stock KickMessage(const string[])
- {
- new File:HF = fopen("hf.txt",io_append);
- fwrite(HF, string);
- fclose(HF);
- }
Add Comment
Please, Sign In to add comment