07.02.2012, 10:53
Hello Server Support, I have some issues with my GM, I downloaded it and it came with everything, but the problem is that the Anti-Cheat messes things up, ANYONE that enters the game will get banned automatically after a short while (Around 30 Seconds). I came to a conclusion that I simply want to remove the whole Anti-Cheat part of the script. I thought that I should attempt to delete it myself, that didn't go so well and resulted in BIGGER errors. So I came to the SAMP Community. I will do my best to keep the script short since I don't exactly know which areas to show you guys but here it is below. Please help as soon as possible. - Just show me a new copy of what to delete to remove the Anti-Cheat.
I think that is it, I tried my best, please someone help me. If you want, I can put a certain amount in one post and the rest in another post in the same thread, or if this is okay.
Код:
forward SaveAnticheat(); forward LoadAnticheat(); forward PeterAC(); new AntiSpam = 0; new AntiAfk = 0; new AntiBunnyJump = 0; new AntiWeaponHack = 1; new AntiDriveBy = 1; new AntiInteriorHack = 0; new AntiMoneyHack = 1; new AntiJetpackHack = 0; new AntiFakeKill = 1; new AntiHighPing = 1; new MaxPing = 999; new AntiName = 1; public OnPlayerDeath(playerid, killerid, reason) { new string[128]; new name[MAX_PLAYER_NAME]; new name2[MAX_PLAYER_NAME]; new deathreason[20]; new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(killerid, name2, sizeof(name2)); if(killerid != INVALID_PLAYER_ID) { if(GetPlayerWeapon(killerid) != reason) { if(AntiFakeKill == 1) { if(reason != 51 || reason != 50 || reason != 18 || reason == 36 || reason == 35 || reason == 40 || reason == 16) { FakeKillWarns[playerid] ++; if(FakeKillWarns[playerid] == 4) { format(string, sizeof(string), "%s (%d), Has been kicked by The Anticheat Peter Griffin for Possible Fake Death Hacks.", name, playerid); SendClientMessageToAll(COLOR_NICERED, string); SendClientMessage(playerid,COLOR_LIGHTBLUE, "You have Been Kicked by The Anticheat For Possible Fake Death Hacks."); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Fake Death hacks.",d,m,y,h,mi,s,name); KickLog(string); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Kicked by the Anticheat - Fake Death Hacks.",d,m,y,h,mi,s,name); AddPunishment(playerid, string); Kick(playerid); } else { format(string, sizeof(string), "[PETER]: %s (%d) Is possibly Using Fake Death Hacks; Check him inmediately!!", name, playerid); SendAdminMessage(COLOR_YELLOW, string); PlayerSuspicious[playerid] = 1; PlayerFakeDeathHacking[playerid] = 1; PlayerGotSpottedRecently[playerid] = 1; SetTimerEx("ResetAcWarn", 300000, 0, "i", playerid); } } } } } if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER) { if(AntiDriveBy == 1) { new model = GetVehicleModel(GetPlayerVehicleID(killerid)); if(model != 520 || model != 425 || model != 432) { PlayerInfo[killerid][pWarns] ++; if(PlayerInfo[playerid][pWarns] == 3) { format(string, sizeof(string), "%s (%d), Has been Kicked by The Anticheat Peter Griffin for Excessive Drive by Killing.", name2, killerid); SendClientMessageToAll(COLOR_NICERED, string); SendClientMessage(killerid,COLOR_LIGHTBLUE, "You have Been Kicked by The Anticheat For Excessive Drive By Killing"); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Excessive Drive By Killing",d,m,y,h,mi,s,name2); KickLog(string); Kick(killerid); } else { format(string, sizeof(string), "%s (%d), Has been Warned by The Anticheat Peter Griffin for Drive by Killing.", name2, killerid); SendClientMessageToAll(COLOR_NICERED, string); SendClientMessage(killerid,COLOR_LIGHTBLUE, "You have Been Warned by The Anticheat For Excessive Drive By Killing"); format(string, sizeof(string), "[PETER]: %s Has Killed someone With Driver Drive By; Player has been Warned.", name2); SendAdminMessage(COLOR_YELLOW, string); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Warned by Anticheat - Reason: Driver drive-by kill.",d,m,y,h,mi,s); AddPunishment(killerid, string); } } } } } if(dialogid == 1234) // /turn for admins { if(response) { if(listitem == 0) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiBunnyJump == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the Bunny jump Detection!"); AntiBunnyJump = 0; format(string, 128, "[ADMIN]: %s has turned off the Bunny jump Detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiBunnyJump == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the Bunny jump Detection!"); AntiBunnyJump = 1; format(string, 128, "[ADMIN]: %s has turned on the Bunny jump Detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } else if(listitem == 1) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiWeaponHack == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the Weapon hacks detection!"); AntiWeaponHack = 0; format(string, sizeof(string), "[ADMIN]: %s has turned off the Weapon hacks detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiWeaponHack == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the Weapon hacks detection!"); AntiWeaponHack = 1; format(string, sizeof(string), "[ADMIN]: %s has turned on the Weapon hacks detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } else if(listitem == 2) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiInteriorHack == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the Interior hacks detection!"); AntiInteriorHack = 0; format(string, sizeof(string), "[ADMIN]: %s has turned off the Interior hacks detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiInteriorHack == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the Interior hacks detection!"); AntiInteriorHack = 1; format(string, sizeof(string), "[ADMIN]: %s has turned on the Interior hacks detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } else if(listitem == 3) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiJetpackHack == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the Jetpack hacks detection!"); AntiJetpackHack = 0; format(string, sizeof(string), "[ADMIN]: %s has turned off the Jetpack hacks detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiJetpackHack == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the Jetpack hacks detection!"); AntiJetpackHack = 1; format(string, sizeof(string), "[ADMIN]: %s has turned on the Jetpack hacks detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } else if(listitem == 4) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiMoneyHack == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the Money hacks detection!"); AntiMoneyHack = 0; format(string, sizeof(string), "[ADMIN]: %s has turned off the Money hacks detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiMoneyHack == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the Money hacks detection!"); AntiMoneyHack = 1; format(string, sizeof(string), "[ADMIN]: %s has turned on the Money hacks detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } else if(listitem == 5) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiAfk == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the Anti AFK detection!"); AntiAfk = 0; format(string, sizeof(string), "[ADMIN]: %s has turned off the Anti AFK detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiAfk == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the Anti AFK detection!"); AntiAfk = 1; format(string, sizeof(string), "[ADMIN]: %s has turned on the Anti AFK detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } else if(listitem == 6) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiName == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the Anti Non-RP Names detection!"); AntiName = 0; format(string, sizeof(string), "[ADMIN]: %s has turned off the Anti Non-RP Names detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiName == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the Anti Non-RP Names detection!"); AntiName = 1; format(string, sizeof(string), "[ADMIN]: %s has turned on the Anti Non-RP Names detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } else if(listitem == 7) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiDriveBy == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the Driver DB Detection!"); AntiDriveBy = 0; format(string, sizeof(string), "[ADMIN]: %s has turned off the Driver DB Detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiDriveBy == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the Driver DB Detection!"); AntiDriveBy = 1; format(string, sizeof(string), "[ADMIN]: %s has turned on the Driver DB Detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } else if(listitem == 8) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiFakeKill == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the Anti Fake death Detection!"); AntiFakeKill = 0; format(string, sizeof(string), "[ADMIN]: %s has turned off the Anti Fake death Detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiFakeKill == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the Anti Fake death Detection!"); AntiFakeKill = 1; format(string, sizeof(string), "[ADMIN]: %s has turned on the Anti Fake death Detection.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } else if(listitem == 9) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiHighPing == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the High ping kicker!"); AntiHighPing = 0; format(string, sizeof(string), "[ADMIN]: %s has turned off the High ping kicker.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiHighPing == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the High ping kicker!"); AntiHighPing = 1; format(string, sizeof(string), "[ADMIN]: %s has turned on the High ping kicker.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } else if(listitem == 10) { ShowPlayerDialog(playerid, 13337,DIALOG_STYLE_INPUT,"Max Ping","Insert the max ping here, Must be numeric!","Input","Cancel"); } else if(listitem == 11) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } if(AntiSpam == 1) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned off the anti flood kicker!"); AntiSpam = 0; format(string, sizeof(string), "[ADMIN]: %s has turned off the anti flood kicker.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } else if(AntiSpam == 0) { SendClientMessage(playerid, COLOR_GREY, "* You have Turned on the anti flood kicker!"); AntiSpam = 1; format(string, sizeof(string), "[ADMIN]: %s has turned on the anti flood kicker.",sendername); ABroadCast(COLOR_LIGHTRED, string, 5); } } } SaveAnticheat(); } if(dialogid == 13337) { if(response) { if(PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this option"); return 1; } new final = strval(inputtext); if(final != 0) { if (final > 65535 || final < 100) { SendClientMessage(playerid, COLOR_GRAD2, "* Max ping may not go above 65535 or below 100"); ShowPlayerDialog(playerid, 13337,DIALOG_STYLE_INPUT,"Max Ping (100-65535)","Insert the max ping here, Must be numeric!","Input","Cancel"); return 1; } MaxPing = final; format(string, sizeof(string),"* Max ping set to %d",final); SendClientMessage(playerid, COLOR_GREY,string); format(string,sizeof(string),"* The max ping has been set to %d by the Developer %s (%d)",final,sendername,playerid); SendClientMessageToAll(COLOR_CREAM,string); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s has set the max ping to %d",d,m,y,h,mi,s,sendername, final); AdminLog(string); } else return SendClientMessage(playerid, COLOR_GREY,"* Invalid ping, must be numeric and above 100!") && ShowPlayerDialog(playerid, 13337,DIALOG_STYLE_INPUT,"Max Ping (100-65535)","Insert the max ping here, Must be numeric!","Input","Cancel"); } } return 0; } public PeterAC() { new weaponid, ammo; new plname[64], string[128]; new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && !IsPlayerNPC(i)) { GetPlayerName(i, plname, sizeof(plname)); if(AntiWeaponHack == 1) { if (PlayerGotSpottedRecently[i] == 0) { if(ScriptWeaponsUpdated[i] == 0) { for (new c = 0; c < 13; c++) { GetPlayerWeaponData(i, c, weaponid, ammo); if (weaponid != 0 && ammo != 0) { if (ScriptWeapons[i][c] != weaponid) { new weapon[24]; GetWeaponName(weaponid, weapon, 24); format(string, sizeof(string), "%s (%d), Has been Banned by The Anticheat Peter Griffin for Weapon Hacking.", plname, i); SendClientMessageToAll(COLOR_NICERED, string); format(string, sizeof(string),"You have Been Banned by The Anticheat For Weapon Hacking a %s (%d)",weapon,weaponid); SendClientMessage(i,COLOR_LIGHTBLUE, string); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Banned %s for Weapon Hacking a %s (%d)",d,m,y,h,mi,s,plname,weapon,weaponid); BanLog(string); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Banned by the Anticheat - Weapon Hacking a %s with %d ammo.",d,m,y,h,mi,s,plname,weapon,weaponid); AddPunishment(i, string); SafeResetPlayerWeapons(i); ScriptBan(i,999,"Weapon Hacks"); } } } } } } if(AntiJetpackHack == 1) { new pSpecialAction = GetPlayerSpecialAction(i); if (pSpecialAction == SPECIAL_ACTION_USEJETPACK) { TogglePlayerControllable(i, 0); format(string, sizeof(string), "Anticheat: You have Been Banned for Jetpack Hacks. Date: %d/%d/%d Time: %d:%d:%d",d,m,y,h,mi,s); SendClientMessage(i, COLOR_LIGHTRED, string); SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: If You think that this has been an error, report inmediately to any Server Developer"); SendClientMessage(i, COLOR_BLUE, "Anticheat: Apply For Unban at Our Forums with the Screen of the Reason, Don't Evade the Ban!"); OnPlayerUpdateEx(i); ScriptBan(i,999,"Jetpack Hacks"); format(string, sizeof(string), "%s, Has been banned by Anticheat Peter for Jetpack Hacks", plname); SendClientMessageToAll(COLOR_NICERED, string); } } if(AntiMoneyHack == 1) { if(PlayerGotSpottedRecently[i] == 0) { if(!IsAtCandySprunk(i)) { if(GetPlayerMoney(i) != ScriptMoney[i]) { if(ScriptMoneyUpdated[i] == 0) { if(IsAtPaySpray(i) || IsAtTransfender(i)) { SetRealMoney(i, GetPlayerMoney(i)); } if((GetPlayerMoney(i) - ScriptMoney[i]) >= 500 && (GetPlayerMoney(i) - ScriptMoney[i]) != 0) { if(admins == 0 || afkadmins == admins) { format(string, sizeof(string), "%s (%d), Has been kicked by The Anticheat Peter Griffin for Possible Money Hacking.", plname, i); SendClientMessageToAll(COLOR_NICERED, string); format(string, sizeof(string), "You have Been Kicked by The Anticheat For Possible Weapon Money Hacking ($%d)",(GetPlayerMoney(i) - ScriptMoney[i])); SendClientMessage(i,COLOR_LIGHTBLUE, string); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Money Hacking ($%d)",d,m,y,h,mi,s,plname,(GetPlayerMoney(i) - ScriptMoney[i])); KickLog(string); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Kicked by the Anticheat - Money Hacking.",d,m,y,h,mi,s,plname); AddPunishment(i, string); Kick(i); } format(string, sizeof(string), "[PETER]: %s (%d) Is possibly Using Money Hacks; Check him inmediately!!", plname, i); SendAdminMessage(COLOR_YELLOW, string); PlayerSuspicious[i] = 1; PlayerMoneyHacking[i] = 1; PlayerSuspiciousMoney[i] = (GetPlayerMoney(i) - ScriptMoney[i]); PlayerGotSpottedRecently[i] = 1; SetTimerEx("ResetAcWarn", 300000, 0, "i", i); } else {if((GetPlayerMoney(i) - ScriptMoney[i]) >= 1) { format(string, sizeof(string), "[PETER]: %s (%d) Is Bugged on a Cash Inbalance, Check him inmediately!!", plname, i); SendAdminMessage(COLOR_YELLOW, string); PlayerSuspicious[i] = 1; PlayerOnCashInbalance[i] = 1; PlayerSuspiciousMoney[i] = (GetPlayerMoney(i) - ScriptMoney[i]); PlayerGotSpottedRecently[i] = 1; SetTimerEx("ResetAcWarn", 90000, 0, "i", i); } } } } } } } if(AntiInteriorHack == 1) { if(GetPlayerInterior(i) != PlayerInfo[i][pInt]) { format(string, sizeof(string), "[PETER]: %s (%d) Is possibly using Interior Hacks; Check him inmediately!!", plname,i); SendAdminMessage(COLOR_YELLOW, string); PlayerSuspicious[i] = 1; PlayerInteriorHacking[i] = 1; PlayerSuspiciousInterior[i] = GetPlayerInterior(i); PlayerGotSpottedRecently[i] = 1; SetTimerEx("ResetAcWarn", 300000, 0, "i", i); } } } } return 1; } if(IsPlayerConnected(i)) { new ping = GetPlayerPing(i); if(ping > MaxPing) { if(FirstSpawn[i] == 0) { if(PlayerInfo[i][pAdmin] < 1) { format(string, sizeof(string), "%s (%d), Has been Kicked by The Anticheat Peter Griffin for Exceeding the Maximun Ping.", plname, i); SendClientMessageToAll(COLOR_NICERED, string); SendClientMessage(i,COLOR_LIGHTBLUE, "You have Been Kicked by The Anticheat For Exceeding the Maximun Ping"); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Exceeding the Maximun Ping",d,m,y,h,mi,s,plname); KickLog(string); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Kicked by The Anticheat - Exceeding maximun ping allowed.",d,m,y,h,mi,s); AddPunishment(i, string); Kick(i); } } } if(GetPlayerState(i) == 2) { new kmh = GetPlayerSpeed(i, true); if ((BusrouteEast[i][0] >= 0 && BusrouteWest[i][0] >= 0)) { if(PlayerInfo[i][pSpeedo] == 2) { if(kmh >= 0 && kmh <= 80) { format(string, 64, "~w~Speed: ~g~~h~%d ~w~KM/h.", kmh); } else if(kmh >= 81 && kmh <= 120) { format(string, 64, "~w~Speed: ~y~~h~%d ~w~KM/h.", kmh); } else if(kmh >= 121) { format(string, 64, "~w~Speed: ~r~~h~%d ~w~KM/h.", kmh); } TextDrawSetString(Textdraw39[i], string); } if(kmh > maxspeed && PlayerInfo[i][pAdmin] < 6) { new tmpcar = GetPlayerVehicleID(i); if(!IsAPlane(tmpcar) || tmpcar < 1698) { if(!IsPlayerNPC(i)) { if(PlayerGotSpottedRecently[i] == 0) { if(admins == 0 || afkadmins == admins) { format(string, sizeof(string), "%s (%d), Has been Kicked by The Anticheat Peter Griffin for Possible Speed Hacking.", plname, i); SendClientMessageToAll(COLOR_NICERED, string); SendClientMessage(i,COLOR_LIGHTBLUE, "You have Been Banned by The Anticheat For Possible Speed Hacking"); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Speed Hacking",d,m,y,h,mi,s,plname); KickLog(string); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Kicked by the Anticheat - Speed Hacking.",d,m,y,h,mi,s,plname); AddPunishment(i, string); Kick(i); } GetPlayerName(i, plname, sizeof(plname)); format(string, 128, "[PETER]: %s (%d) is going at %d km/h; Check him immediately!!",plname,i,kmh); SendAdminMessage(COLOR_YELLOW,string); PlayerSuspicious[i] = 1; PlayerSpeedHacking[i] = 1; PlayerSuspiciousSpeed[i] = kmh; PlayerGotSpottedRecently[i] = 1; SetTimerEx("ResetAcWarn", 60000, 0, "i", i); } } } } } SaveStuff(); SaveSecurity(); SaveAnticheat(); ServerRestarted = 1; GameModeExit(); public LoadAnticheat() { new arrCoords[12][64]; new strFromFile2[128]; new File: file = fopen("LARP/anticheat.ini", io_read); if (file) { fread(file, strFromFile2); split(strFromFile2, arrCoords, ','); AntiBunnyJump = strval(arrCoords[0]); AntiWeaponHack = strval(arrCoords[1]); AntiMoneyHack = strval(arrCoords[2]); AntiInteriorHack = strval(arrCoords[3]); AntiJetpackHack = strval(arrCoords[4]); AntiAfk = strval(arrCoords[5]); AntiName = strval(arrCoords[6]); AntiDriveBy = strval(arrCoords[7]); AntiFakeKill = strval(arrCoords[8]); AntiHighPing = strval(arrCoords[9]); MaxPing = strval(arrCoords[10]); AntiSpam = strval(arrCoords[11]); fclose(file); } else { fopen("LARP/anticheat.ini", io_write); print("[ERROR]: anticheat.ini wasn't found in scriptfiles/LARP, Creating it NOW"); SaveAnticheat(); fclose(file); } return 1; } public LoadMotd() { new arrCoords[1][64]; new strFromFile2[64]; new File: file = fopen("LARP/motd.ini", io_read); if (file) { fread(file, strFromFile2); split(strFromFile2, arrCoords, ','); strmid(Motd, arrCoords[0], 0, strlen(arrCoords[0]), 255); fclose(file); } else { fopen("LARP/motd.ini", io_write); print("[ERROR]: motd.ini wasn't found in scriptfiles/LARP, Creating it NOW"); SaveMotd(); fclose(file); } return 1; } public SaveAnticheat() { new coordsstring[128]; format(coordsstring, sizeof(coordsstring), "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", AntiBunnyJump,AntiWeaponHack,AntiMoneyHack,AntiInteriorHack,AntiJetpackHack,AntiAfk,AntiName,AntiDriveBy,AntiFakeKill,AntiHighPing,MaxPing,AntiSpam); new File: file2 = fopen("LARP/anticheat.ini", io_write); fwrite(file2, coordsstring); fclose(file2); return 1; }
I think that is it, I tried my best, please someone help me. If you want, I can put a certain amount in one post and the rest in another post in the same thread, or if this is okay.