Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if defined _nex_ac_included
- forward OnCheatDetected(playerid, ip_address[], type, code);
- public OnCheatDetected(playerid, ip_address[], type, code)
- {
- switch(code)
- {
- case 5, 6, 11, 22: return 1;
- case 14:
- {
- new string[156],
- a = AntiCheatGetMoney(playerid);
- format(string, sizeof(string), "[Nex-AC] %s co the dang hack money (server-side money: %d, nex-ac money: %d, client-side money: %d)",
- characterInfo[playerid][characterName], characterInfo[playerid][cash], a, GetPlayerMoney(playerid));
- adminMsg(COLOR_GREEN, string);
- ResetPlayerMoney(playerid);
- _setPlayerMoney(playerid, characterInfo[playerid][cash]);
- }
- case 32:
- {
- new Float:x, Float:y, Float:z;
- AntiCheatGetPos(playerid, x, y, z);
- SetPlayerPos(playerid, x, y, z);
- }
- case 40:
- {
- msg(playerid, COLOR_ORANGE, MAX_CONNECTS_MSG);
- AntiCheatKickWithDesync(playerid, code);
- return 1;
- }
- case 41:
- {
- msg(playerid, COLOR_ORANGE, UNKNOWN_CLIENT_MSG);
- AntiCheatKickWithDesync(playerid, code);
- return 1;
- }
- default:
- {
- new string[128],
- ip[16];
- GetPlayerIp(playerid, ip, sizeof(ip));
- format(string, sizeof(string), "[Nex-AC] %s [%s] dang su dung hack/cheat [#%d].",
- characterInfo[playerid][characterName], ip, code);
- adminMsg(COLOR_ORANGE, string);
- }
- }
- new bool:adminOnline = false;
- for(new i = GetPlayerPoolSize(); i >= 0; i--)
- {
- if(characterInfo[i][adminLevel] != 0)
- {
- adminOnline = true;
- break;
- }
- }
- if(!adminOnline) AntiCheatKickWithDesync(playerid, code);
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement