Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Zackie Knoxx's - Anti Cheat
- */
- /*x---------------------------------Important-------------------------------------x*/
- //**INCLUDES**//
- #include <a_samp>
- //**PRAGMAS**//
- //#pragma unused Knoxx_GivePlayerMoney
- //#pragma unused Knoxx_TakePlayerMoney
- //#pragma unused Knoxx_GivePlayerWeapon
- //**MISC**//
- /*x---------------------------------Defining-------------------------------------x*/
- //**COLORS*//
- #define GREEN 0x21DD00FF
- #define RED 0xE60000FF
- #define ADMIN_RED 0xFB0000FF
- #define YELLOW 0xFFFF00FF
- #define ORANGE 0xF97804FF
- #define LIGHTRED 0xFF8080FF
- #define LIGHTBLUE 0x00C2ECFF
- #define PURPLE 0xB360FDFF
- #define PLAYER_COLOR 0xFFFFFFFF
- #define BLUE 0x1229FAFF
- #define LIGHTGREEN 0x38FF06FF
- #define DARKPINK 0xE100E1FF
- #define DARKGREEN 0x008040FF
- #define ANNOUNCEMENT 0x6AF7E1FF
- #define COLOR_SYSTEM 0xEFEFF7AA
- #define GREY 0xCECECEFF
- #define PINK 0xD52DFFFF
- #define DARKGREY 0x626262FF
- #define AQUAGREEN 0x03D687FF
- #define NICESKY 0x99FFFFAA
- #define WHITE 0xFFFFFFFF
- //**MISC**//
- #define ON 1
- #define OFF 0
- #define MAX_WEAPONS 30
- #define MONEY_HACK 50000000 // Maximum money amount, you can change it.
- #define MAX_AMMO_HACK 69 // Maximum bullets found as extra between normal ammo and scripted one. (69 = s0beit)
- #define KICK 1
- #define BAN 2
- //**VARIABLES**//
- enum acInfo
- {
- acWeapon[13],
- acCash,
- acWAmmo[MAX_WEAPONS],
- }
- new Knoxx[MAX_PLAYERS][acInfo];
- new hhtime[MAX_PLAYERS];
- new HACKER = BAN;
- new TOGGLE_WEAPON_DETECTION = ON;
- new TOGGLE_JETPACK_DETECTION = ON;
- // **FORWARDS** //
- forward WeaponDetection();
- forward MoneyDetection();
- forward HealthDetection(playerid);
- forward HealthHackSuspection(suspectid);
- forward Knoxx_OnInit();
- forward Knoxx_OnPlayerSpawn(playerid);
- forward Knoxx_OnPlayerConnect(playerid);
- forward Knoxx_OnPlayerDisconnect(playerid, reason);
- /*x---------------------------------CallBacks-------------------------------------x*/
- public MoneyDetection()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- new cash = GetPlayerMoney(i);
- if (cash > Knoxx[i][acCash])
- {
- if ((cash - Knoxx[i][acCash]) > MONEY_HACK)
- {
- break;
- }
- }
- }
- }
- }
- public Knoxx_OnInit()
- {
- SetTimer("MoneyDetection",2000,1);
- }
- stock GetWeapSlotID(weaponid)
- {
- switch (weaponid)
- {
- case 0,1: return 0;
- case 2..9: return 1;
- case 10..15: return 10;
- case 16..18,39: return 8;
- case 22..24: return 2;
- case 25..27: return 3;
- case 28,29,32: return 4;
- case 33,34: return 6;
- case 35..38: return 7;
- case 41..43: return 9;
- case 44..46: return 11;
- default: return 12;
- }
- return 0;
- }
- stock IsValidWeapon(weaponid)
- {
- if (weaponid > 0) return 1;
- return 0;
- }
- Knoxx_GivePlayerMoney(playerid, amount)
- {
- Knoxx[playerid][acCash] += amount;
- GivePlayerMoney(playerid, amount);
- }
- Knoxx_TakePlayerMoney(playerid, amount)
- {
- Knoxx[playerid][acCash] -= amount;
- GivePlayerMoney(playerid, -amount);
- }
- Knoxx_ResetPlayerMoney(playerid)
- {
- Knoxx[playerid][acCash] -= Knoxx[playerid][acCash];
- GivePlayerMoney(playerid, Knoxx[playerid][acCash]-Knoxx[playerid][acCash]);
- }
- Knoxx_GetPlayerMoney(playerid)
- {
- return Knoxx[playerid][acCash];
- }
Advertisement
Add Comment
Please, Sign In to add comment