quinta-feira, 11 de abril de 2013

0 ControlCheats - Administre diversos cheats facilmente..



ControlCheats.inc

Administre diversos cheats facilmente.

Introdução:
Eaii galerinha, sou iniciante na linguagem pawn.. e estou tendo aulas com um amigo via skype.. mas enfim com base no meu conhecimento eu decidi criar um anti-cheat, sei que já existe muitos porém bugados (não é que eu queria esnobar o trabalho de alguém) é que já foram criados a bastante tempo e não houve as devidas atualizações dos donos.. em relação ao trabalho recentemente criado por Bruno e Paulor foram a minha inspiração para a criação do anticheat e de la foram retiradas algumas lógicas, todos os devidos créditos estaram dentro do código fonte do script.
Esse sistema detecta o meliante e logo é criado um log em sua scriptfiles sobre banimento.. mas, pode ser desativado por você! Alguns sistemas não estão totalmente precisos, mas é claro que sempre estarei atualizando o script.
Last Updates:
VERSÃO 1.1: Sistemas.. de speed hack, fly hack, onstate hack e flood connect foram melhorados e ficaram mais precisos! Ammo Hack (Desativado temporariamente)
VERSÃO 1.5: Sistemas atualizados novamente.. novos anticheats foram inclusos no script como: Anti airbreak, car tele, CarJackHack..
Download:
Faça agora mesmo o download da versão estável do script:
http://pastebin.com/RAfdKuKC
Modo de uso:
Para usar é muito fácil, basta adicionar ao topo do seu gamemode a include ControlCheats.inc!

pawn Code:
#include <a_samp> //Caso houver algumas redefinições: //#if defined MAX_PLAYERS //#undef MAX_PLAYERS //#endif //#define MAX_PLAYERS   (100) #include <ControlCheats> //Outras includes..

Caso você queira redefinir algumas funções do script basta colocar isso acima da include:

pawn Code:
#include <a_samp> //#if defined MAX_PLAYERS //#undef MAX_PLAYERS //#endif //#define MAX_PLAYERS   (100) //-- FALSE - MOSTRA O FLOOD COMETIDO PELO PLAYER. //-- TRUE - NÃO MOSTRA O FLOOD COMETIDO PELO PLAYER. #undef INVALID_CHAT_BLOCK #define INVALID_CHAT_BLOCK false //-- FALSE - NÃO SALVA LOG DE QUEM FOI PEGO PELO SISTEMA. (PADRÃO: TRUE) //-- TRUE - SALVAR O LOG DE QUEM FOI PEGO PELO SISTEMA. #undef SAVE_LOG #define SAVE_LOG false // Redefinindo para false //-- REDEFINIR O DIRETORIO DOS LOGS. (PADRÃO: "/%s.txt") #undef INVALID_FILE #define INVALID_FILE "/Logs/%s.txt" //-- REDEFINIR O PING MAXIMO DO SERVIDOR. (PADRÃO: 900) #undef INVALID_MAX_PING #define INVALID_MAX_PING (1000) #include <ControlCheats>

Para ver os outros tipos de configurações, visite o código fonte do script.

Exemplo básico:

pawn Code:
#include <a_samp> #include <ControlCheats> public OnPlayerControllingCheat(playerid, cheatid) {     switch(cheatid) {         case PLAYER_ONTEXT_FLOOD: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi kickado por flood no chat!");             Kick(playerid);         }         case PLAYER_ONCONNECT_FLOOD: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por boots!");             BanEx(playerid, #boots);         }         case PLAYER_ONSTATE_HACK_1: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por cleo4 (Puxar varios veiculos)!");             BanEx(playerid, #cleo4 Veh);         }         case PLAYER_ONSTATE_HACK_2: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por cleo4 (CarJackHack)!");             BanEx(playerid, #cleo4 Veh CarJackHack);         }         case PLAYER_ONSTATE_HACK_3: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por cleo4 (Puxar varios veiculos)!");             BanEx(playerid, #cleo4 Veh);         }         case PLAYER_ONDEATH_HACK: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por cleo4 (Fake-Kill)!");             BanEx(playerid, #FakeKill);         }         case PLAYER_ONPING_HIGH: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi kickado por ping alto!");             Kick(playerid);         }         case PLAYER_ONFLY_HACK: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por fly!");             BanEx(playerid, #Fly);         }         case PLAYER_ONSPEED_HACK_1: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por speed hack!");             BanEx(playerid, #SpeedHack);         }         case PLAYER_ONSPEED_HACK_2: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por speed hack!");             BanEx(playerid, #SpeedHack);         }         case PLAYER_ONMONEY_HACK: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por money hack!");             BanEx(playerid, #MoneyHack);         }         case PLAYER_ONSCORE_HACK: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por score hack!");             BanEx(playerid, #ScoreHack);         }         case PLAYER_ONWEAP_HACK: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por weapon hack!");             BanEx(playerid, #WeaponHack);         }         case PLAYER_ONAMMO_HACK: { //Desativado temporariamente             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por ammo hack!");             BanEx(playerid, #AmmoHack);         }         case PLAYER_ONBREAKCAR_HACK_1: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por car tele hack!");             BanEx(playerid, #CarTeleHack);         }         case PLAYER_ONBREAKCAR_HACK_2: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por car tele hack!");             BanEx(playerid, #CarTeleHack);         }         case PLAYER_ONBREAKCAR_HACK_3: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por car tele hack!");             BanEx(playerid, #CarTeleHack);         }         case PLAYER_ONBREAKCAR_HACK_4: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por car tele hack!");             BanEx(playerid, #CarTeleHack);         }         case PLAYER_ONBREAK_HACK_1: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por airbreak hack!");             BanEx(playerid, #AirbreakHack);         }         case PLAYER_ONBREAK_HACK_2: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por airbreak hack!");             BanEx(playerid, #AirbreakHack);         }         case PLAYER_ONBREAK_HACK_3: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por airbreak hack!");             BanEx(playerid, #AirbreakHack);         }         case PLAYER_ONBREAK_HACK_4: {             SendClientMessage(playerid, 0xFFFFFFFF, "ControlCheats: Você foi banido por airbreak hack!");             BanEx(playerid, #AirbreakHack);         }     }     return true; }

OBS: Recomendo a utilização desta include em GameModes.. em filterscripts pode haver bugs.
OBS²: Anti-Ammo hack está reportando falsos reportes de vez em quando, será arrumado em breve. - Desativado temporariamente.
OBS³: Recomendo retirar os interiores de ammunation pois pode haver falsos reportes.. como ammo hack, weapon hack e talvez money hack! mesmo o player não sendo!
Funções:
NomeParâmetrosFunção
PLAYER_ONTEXT_FLOODN/AFlood chat
PLAYER_ONCONNECT_FLOODN/ABoot flood connect
PLAYER_ONSTATE_HACK_1N/ACleo4(Puxar varios veiculos)
PLAYER_ONSTATE_HACK_2N/ACleo4(CarJackHack)
PLAYER_ONSTATE_HACK_3N/ACleo4(Puxar varios veiculos)
PLAYER_ONDEATH_HACKN/AFake-Kill, spam death
PLAYER_ONMONEY_HACKN/AMoney Hack
PLAYER_ONSCORE_HACKN/AScore Hack
PLAYER_ONPING_HIGHN/AAlto Ping
PLAYER_ONFLY_HACKN/AFly hack
PLAYER_ONSPEED_HACK_1N/ASpeed hack
PLAYER_ONSPEED_HACK_2N/ASpeed hack
PLAYER_ONWEAP_HACKN/AArma hack
PLAYER_ONBREAK_HACK_1N/AAirbreak hack
PLAYER_ONBREAK_HACK_2N/AAirbreak hack
PLAYER_ONBREAK_HACK_3N/AAirbreak hack
PLAYER_ONBREAK_HACK_4N/AAirbreak hack
PLAYER_ONBREAKCAR_HACK_1N/ACarTele hack
PLAYER_ONBREAKCAR_HACK_2N/ACarTele hack
PLAYER_ONBREAKCAR_HACK_3N/ACarTele hack
PLAYER_ONBREAKCAR_HACK_4N/ACarTele hack
PLAYER_ONAMMO_HACKN/AAmmo hack - DESATIVADO TEMPORARIAMENTE!
OnPlayerControllingCheat(playerid, cheatid)Painel de controle
Bugs?/Críticas?/Elogios?:
Estou aberto a tudo, ou melhor, quase tudo. Portanto, viu bugs? quer criticar? elogiar? Pode falar aqui no tópico mesmo, ou me mande uma PM.

0 comentários: