Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //anti-cheat by viper
- //so far only 1 hack is covered but more is being developed
- //please dont remove credits
- #include <a_samp>
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- #define COLOR_RED 0xFF0000AA
- new banning[MAX_PLAYERS];
- forward banningtimer();//timer for when getting banned
- forward weaponanti();//checks if a player has an illegal weapon
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Anti-cheat by viper");
- print("--------------------------------------\n");
- SetTimer("weaponanti",5000,1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #endif
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid,COLOR_RED,"this server is protected by viper's anti-cheat");
- return 1;
- }
- public banningtimer()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if(banning[i] == 1)
- {
- Ban(i);
- }
- }
- }
- public weaponanti()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if (GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36)
- {
- new pname[200];
- new string[200];
- GetPlayerName(i, pname, sizeof(pname));
- format(string, sizeof(string), "(ANTI-CHEAT BAN) %s has been banned by the anti-cheat system for weapon hacking", pname);
- SendClientMessageToAll(COLOR_RED,string);
- SetTimer("banningtimer",2000,0);
- banning[i] =1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement