rendered paste body/*-----------------------------..::Anti Cheater Script::..Coded by [SDR]Aqua_Marine-----------------------------*/#include <a_samp>#define MAX_SPAM 3new dbtime;new antidb;new DB[200];new weap,bull,gun,ammo;new SpamStrings[MAX_PLAYERS];forward AntiDriveBy(playerid);forward Time();forward MoneyHack();forward InfHealth();public OnFilterScriptInit(){ print("=== AntiCheater Script Loaded =="); SetTimer("Time",2000,1); //プレーヤーの情報を取得する時間を設定(ミリ秒) return 1;}public OnFilterScriptExit(){ print("=== AntiCheater Script Unloaded =="); return 1;}// Money Hack Auto Banpublic MoneyHack(){ new i; for(i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { GetPlayerMoney(i); if(GetPlayerMoney(i) >= 10000000)//プレーヤーが設定した額以上のお金を持っていたらBanします。 { new name[16]; GetPlayerName(i,name,sizeof(name)); new string[256]; format(string,sizeof(string)," AutoBan: %d はMoneyHackを使用していたためBanされました。",name); SendClientMessageToAll(0xFFFF00AA,string); BanEx(i,"Money Hack Cheat"); } } } return 1;}// Weapon Hack Auto Banpublic OnPlayerDeath(playerid, killerid, reason){ if (DB[playerid] == 1) { KillTimer(dbtime); DB[playerid] = 0; } new i; for(i=0;i<MAX_PLAYERS;i++) { if(reason == 4 && 8 && 9 && 38 && 40 && 36 && 35 && 37 && 42) //Ban対象となるweapon id。複数ある場合は&&で区切ってください。 { new string[256]; new hour; new minute; new second; new year; new month; new day; gettime(hour,minute,second); getdate(year,month,day); new name[16]; GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string)," AutoBan: %d はWeaponHackを使用していたためBanされました。",name); SendClientMessageToAll(0xFFFF00AA,string); BanEx(killerid,"Weapon Hack Cheat"); } } return 1;}// AntiSpam Defenderpublic OnPlayerText(playerid, text[]){ SpamStrings[playerid] ++; if(SpamStrings[playerid] >= MAX_SPAM) { SendClientMessage(playerid,0xFFFF00AA," 短時間に連続してのメッセージは送れません。5秒お待ちください。"); return false; } return true;}public Time(){ for(new i = 0; i < MAX_PLAYERS; i ++) { if(SpamStrings[i] > 0) { SpamStrings[i] --; } }}// ===========================================//Anti Drive By off/onpublic OnPlayerCommandText(playerid, cmdtext[]){ if (strcmp("/db", cmdtext, true, 10) == 0) { if (!IsPlayerAdmin(playerid)) return 0; if (antidb == 1) { antidb = 0; SendClientMessage(playerid,0xFFFF00AA," DriveByを無効にしました。"); } else if (antidb == 0) { antidb = 1; SendClientMessage(playerid,0xFFFF00AA," DriveByを有効にしました。"); } return 1; } return 0;}// Infinity Health Vehicles Auto Banpublic OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ GetPlayerWeaponData(playerid,4,gun,ammo); if (antidb == 1 && ammo >= 1 && !ispassenger) { GetPlayerWeaponData(playerid,4,weap,bull); GivePlayerWeapon(playerid,weap,-bull); dbtime = SetTimerEx("AntiDriveBy",7000,0,"d",playerid); DB[playerid] = 1; } new i; for(i=0;i<MAX_PLAYERS;i++) { new Float:pHealth; GetVehicleHealth(i, pHealth); if(GetVehicleHealth(i,pHealth) > 5001) { if(IsPlayerConnected(i)) { new hour; new minute; new second; new year; new month; new day; new name[16]; new string[256]; gettime(hour,minute,second); getdate(year,month,day); GetPlayerName(i,name,sizeof(name)); format(string,sizeof(string)," AutoBan: %d はVehicleHealthHackを使用していたためBanされました。", name); SendClientMessageToAll(0xFFFF00AA,string); BanEx(i,"Infinity Health Vehicle Cheat"); } } } return 1;}//Health Hack Banpublic InfHealth(){ new i; for(i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { new Float:phealth; GetPlayerHealth(i,phealth); if(GetPlayerHealth(i,phealth) > 120)//プレーヤーの体力がこの値を超えるとbanされます。 { new name[16]; GetPlayerName(i,name,sizeof(name)); new string[256]; format(string,sizeof(string)," AutoBan: %d はHealthHackを使用していたためBanされました。",name); SendClientMessageToAll(0xFFFF00AA,string); BanEx(i,"Health Hack(God Mode)"); } } } return 1;}