Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- --------------------------------------------------------------------------------
- • AG - Efficient Anti-Glith •
- Autor: Allan Jader
- Date: 18/08/2010
- Function: Proibir o uso de glitch em combate
- ------------------------------------------------------------------------------*/
- #include <a_samp>
- #pragma tabsize 0
- #define Branco 0xFFFFFFAA
- //------------------------------------------------------------------------------
- forward Descongelar(playerid);
- //------------------------------------------------------------------------------
- new Stock_Keys[MAX_PLAYERS][30];
- new temp_Stock_Keys[MAX_PLAYERS][20];
- new Glitch_Sequences[8][10]={ "1324020","132020","13220","132128","132420","1361281","1321280","13240"};
- new GS;
- //------------------------------------------------------------------------------
- public OnFilterScriptInit()
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- SetPVarInt(i,"Avisado",0);//to debug
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(strlen(Stock_Keys[playerid]) >= 20) format(Stock_Keys[playerid],30,"");
- format(temp_Stock_Keys[playerid],20,"%d",newkeys);
- strcat(Stock_Keys[playerid],temp_Stock_Keys[playerid],30);
- for(GS=0; GS<10; GS++)
- {
- if(strfind(Stock_Keys[playerid], Glitch_Sequences[GS], false ) != -1)
- {
- TogglePlayerControllable(playerid,false);
- SetPlayerArmedWeapon(playerid,0);
- if(GetPVarInt(playerid,"Avisado") == 0)
- {
- SendClientMessage(playerid,Branco,"[AVISO] Sem glitch, não persista ou será kikado!");
- SetPVarInt(playerid,"Avisado",1);
- SetPVarInt(playerid,"Avisos",GetPVarInt(playerid,"Avisos")+1);
- SetTimerEx("Descongelar",3000,false,"i",playerid);
- format(Stock_Keys[playerid],30,"AG");
- }
- if(GetPVarInt(playerid,"Avisos") == 4) //ou outra quantidade a sua preferência
- {
- new Name[MAX_PLAYER_NAME],string[80];
- GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
- format(string,80,"%s foi kikado(a) por fazer glitch.",Name);
- SendClientMessageToAll(Branco,string);
- format(Stock_Keys[playerid],30,"AG");
- Kick(playerid);
- }
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- public Descongelar(playerid)
- {
- SetPVarInt(playerid,"Avisado",0);
- TogglePlayerControllable(playerid,true);
- format(Stock_Keys[playerid],30,"AG");
- return 1;
- }
- //------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment