#include <a_samp>#define di_1 0new db[MAX_PLAYERS]=0;forward cheatupdate(playerid);new bool:robot[MAX_PLAYERS]=true;new bekapcsolta=2;public OnFilterScriptInit(){SetTimer(\"cheatupdate\", 5000, true);bekapcsolta=1;return 1;}public OnPlayerDisconnect(playerid, reason){db[playerid]=0;return 1;}public OnPlayerSpawn(playerid){TogglePlayerControllable(playerid, false);SetTimerEx(\"skoff\", 3000, 0,\"i\",playerid);GameTextForPlayer(playerid, \"~r~SK ~b~V¾delem\", 3000,6);return 1;}public OnPlayerConnect(playerid){ robot[playerid]=true;if(bekapcsolta==1){SendClientMessage(playerid, 0xFFFFFFAA, \"Anti Cheat Rendszer bekapcsolva! {0dff00}(Státusz: Robot pilóta)\");robot[playerid]=true;}else{SendClientMessage(playerid, 0xFFFFFFAA, \"Anti Cheat Rendszer bekapcsolva! {0dff00}(Státusz: Kézi vezérlés)\");robot[playerid]=false;}return 1;}forward skoff(playerid);public skoff(playerid){TogglePlayerControllable(playerid, true);GameTextForPlayer(playerid, \"~r~Jo ~b~Jat¾kot\", 3000,6);return 1;}public OnPlayerDeath(playerid, killerid, reason){if(IsPlayerInAnyVehicle(killerid)){ new stat = GetPlayerState(killerid); if(stat==PLAYER_STATE_DRIVER){ if(robot[playerid]==true){ new name[MAX_PLAYER_NAME]; GetPlayerName(killerid, name, sizeof(name)); new mes[128]; db[killerid]++; format(mes,sizeof(mes),\"AntiDB: %s figyelmeztetve lett DB miatt! %d/3\",name,db[killerid]); SendClientMessageToAll( 0xFB0000FF,mes); }else{ new report[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(report, sizeof(report), \"AntiDB: %s [iD: %d] DB-zik!\",name,playerid); MessageToAdmins(0xFFFFFFAA,report); } if(db[killerid]>=3){ Kick(killerid); } } }return 1;}public OnPlayerCommandText(playerid, cmdtext[]){if (strcmp(\"/robot\", cmdtext, true, 10) == 0){if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFAA, \"Nem vagy rcon admin!\");ShowPlayerDialog(playerid, di_1, DIALOG_STYLE_LIST, \"AntiCheat robot pilóta\",\"Bekapcsolás\\nKikapcsolás\",\"Kiválaszt\",\"Mégse\");return 1;}if (strcmp(\"/ainfo\", cmdtext, true, 10) == 0){ ShowPlayerDialog(playerid, 3523, DIALOG_STYLE_MSGBOX, \"Antis Script by Mr.M[aa]rK\",\" Robot pilóta be/kikapcsolásához /robot\\n Scriptet készítette: Mr.M[aa]rK\\n www.sa-mp.gportal.hu\",\"Ok\",\"Mégse\");return 1;}return 0;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ if(newkeys & KEY_FIRE && ForbiddenWeap(playerid) && !IsPlayerAdmin(playerid)) { new pname[MAX_PLAYER_NAME]; new string[124]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), \"||- Játékos %s automatikusan bannolva lett ! Indok: Tiltott fegyver használata -||\", pname); SendClientMessageToAll(0xff0000AA,string); print(string); BanEx(playerid,string); return 1; } return 0;}stock ForbiddenWeap(playerid){ new weap = GetPlayerWeapon(playerid); if( weap == 35 || weap == 36 || weap == 37 || weap == 38 || weap == 39 || weap == 40) { return true; } return false;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == di_1){if(response == 1){ switch(listitem){ case 0:{ bekapcsolta=1; SendClientMessageToAll(0x38FF06FF, \"AntiCheat: Robot pilóta bekapcsolva\"); for(new i = 0; i < MAX_PLAYERS; i++){ robot=true; } } case 1:{ bekapcsolta=2; SendClientMessageToAll(0x38FF06FF, \"AntiCheat: Robot pilóta kikapcsolva\"); for(new i = 0; i < MAX_PLAYERS; i++){ robot=false; } } }}return 1;} return 0;}forward MessageToAdmins(color,const string[]);public MessageToAdmins(color,const string[]){for(new i = 0; i < MAX_PLAYERS; i++){if(IsPlayerConnected(i) == 1){ if (IsPlayerAdmin(i)){ SendClientMessage(i, color, string); }}}return 1;}