27.11.2015, 14:15
Queria ajuda de gente experiente, to tentando fazer um sistema anti divulgaзгo, qm souber me ajuda ai, me diz se vai funcionar, fiz certo e fiz da melhor forma, vlw brothers abaixo segue o codigo
Код:
#defin NUMEROS_ANTIDV 432 new IP[NUMEROS_ANTIDV][] = { ":7798", ":7777", ":7778", ":7776", ":7775", ":7774", ":7773", ":7772", ":7771", ":7770", ":5555", ":8888", ":8090", ":6969", ":7780", ":7781", ":7782", ":7783", ":7784", ":7785", ":7786", ":7787", ":7788", ":7789", ":7790", ":7791", ":7792", ":7793", ":7794", ":7795", ":7796", ":7797", ":7798", ":7799", ":7800", "127.", "189.", "188.", "198.", "199.", "171.", "211.", "64.", "66.", "68.", "67.", "65.", "183.", "187.", "201.", "211.", "200.", "141.", "217.", "213.", "80.", "8080.", "127 .", "189 .", "188 .", "198 .", "199 .", "171 .", "211 .", "64 .", "66 .", "68 .", "67 .", "65 .", "183 .", "187 .", "201 .", "211 .", "200 .", "141 .", "217 .", "213 .", "80 .", "8080 .", "189.1.169", "35:7777", "1.169.35", "189.1", "88", "77", "7777", "7 7", "8 8", "189.1.169.35:7777", "200.", "200 .", "189.", "189 .", "201.", "201 .", "200.1", "200.1", "200 . 1", "200. 1", "200 .1", "201.1", "201 . 1", "201. 1", "201 .1", "208.1", "208. 1", "208 .1", "208 . 1", "69.1", "69. 1", "69 . 1", "69 .1", "189.1", "189. 1", "189 .1", "189 . 1", "66.7", "66. 7", "66 .7", "66 . 7", "177.1", "177. 1", "177 .1", "177 . 1", "109 .", "115 .", "119 .", "128 .", "133 .", "140 .", "149 .", "65 .", "32 .", "66 .", ":3127", "150 .", "156 .", "167 .", "173 .", "174 .", "184 .", "187 .", "189 .", "193 .", "195 .", "198 .", "199 .", "200 .", "201 .", "202 .", "203 .", "204 .", "205 .", "206 .", "209 .", "210 .", "212 .", "213 .", "218 .", "219 .", "41 .", "46 .", "58 .", "59 .", "61 .", "70 .", "72 .", "75 .", "77 .", "78 .", "79 .", "80 .", "83 .", "84 .", "85 .", "87 .", "92 .", "94 .", "95 .", "98 .", "99 .", "124 .", "256 .", "512 .", "102 .", ":3128", "211 .", "194 .", "202 .", "146 .", "169 .", "195 .", "152 .", "222 .", "83 .", "221 .", "211 .", "134 .", "110 .", "8 .", "164 .", "109-", "115-", "119-", "128-", "133-", "140-", "149-", "65-", "32-", "66-", ":3127", "150-", "156-", "167-", "173-", "174-", "184-", "187-", "189-", "193-", "195-", "198-", "199-", "200-", "201-", "202-", "203-", "204-", "205-", "206-", "209-", "210-", "212-", "213-", "218-", "219-", "41-", "46-", "58-", "59-", "61-", "70-", "72-", "75-", "77-", "78-", "79-", "80-", "83-", "84-", "85-", "87-", "92-", "94-", "95-", "98-", "99-", "124-", "256-", "512-", "102-", ":3128", "211-", "194-", "202-", "146-", "169-", "195-", "152-", "222-", "83-", "221-", "211-", "134-", "110-", "8-", "164-", "109.", "115.", "119.", "128.", "133.", "140.", "149.", "65.", "32.", "66.", ":3127", "150.", "156.", "167.", "173.", "174.", "184.", "187.", "189.", "193.", "195.", "198.", "199.", "200.", "201.", "202.", "203.", "204.", "205.", "206.", "209.", "210.", "212.", "213.", "218.", "219.", "41.", "46.", "58.", "59.", "61.", "70.", "72.", "75.", "77.", "78.", "79.", "80.", "83.", "84.", "85.", "87.", "92.", "94.", "95.", "98.", "99.", "124.", "256.", "512.", "102.", ":3128", "211.", "194.", "202.", "146.", "169.", "195.", "152.", "222.", "83.", "221.", "211.", "134.", "110.", "8.", "164.", "109 .", "115 .", "119 .", "128 .", "133 .", "140 .", "149 .", "65 .", "32 .", "66 .", ":3127", "150 .", "156 .", "167 .", "173 .", "174 .", "184 .", "187 .", "189 .", "193 .", "195 .", "198 .", "199 .", "200 .", "201 .", "202 .", "203 .", "204 .", "205 .", "206 .", "209 .", "210 .", "212 .", "213 .", "218 .", "219 .", "41 .", "46 .", "58 .", "59 .", "61 .", "70 .", "72 .", "75 .", "77 .", "78 .", "79 .", "80 .", "83 .", "84 .", "85 .", "87 .", "92 .", "94 .", "95 .", "98 .", "99 .", "124 .", "256 .", "512 .", "102 .", ":3128", "211 .", "194 .", "202 .", "146 .", "169 .", "195 .", "152 .", "222 .", "83 .", "221 .", "211 .", "134 .", "110 .", "8 .", "164 ." }; public OnPlayerCommandText(playerid, cmdtext[]) { for(new fdp=0;fdp < NUMEROS_ANTIDV; fdp++){ if(strfind(cmdtext, IP[fdp], true) != -1) { new string[256]; new ipdivulgado[512], ipdocara[128]; GetPlayerIp(playerid,ipdocara,128); format(ipdivulgado, 256, "%s", cmdtext); format(string,sizeof(string),"[AUTO-BAN] (%s) %s divulgando: %s", ipdocara, PlayerName(playerid), ipdivulgado); ABroadCast(COLOR_LIGHTGREEN,bstring,1); writeLog("LOGS/divulgou.txt",string); // pra crashar o cara SetPlayerPos(playerid, 1,1,1); SetPlayerHoldingObject(playerid, 305, 1); // pra banir o cara banned[playerid] = 1; expirarban[playerid] = gettime() + (7 * 86400); Ban(playerid); return 1; } } } public OnPlayerText(playerid, text[]) { for(new fdp=0;fdp < NUMEROS_ANTIDV; fdp++){ if(strfind(text, IP[fdp], true) != -1) { new string[256]; new ipdivulgado[512], ipdocara[128]; GetPlayerIp(playerid,ipdocara,128); format(ipdivulgado, 256, "%s", cmdtext); format(string,sizeof(string),"[AUTO-BAN] (%s) %s divulgando: %s", ipdocara, PlayerName(playerid), ipdivulgado); ABroadCast(COLOR_LIGHTGREEN,bstring,1); writeLog("LOGS/divulgou.txt",string); // pra crashar o cara SetPlayerPos(playerid, 1,1,1); SetPlayerHoldingObject(playerid, 305, 1); // pra banir o cara banned[playerid] = 1; expirarban[playerid] = gettime() + (7 * 86400); Ban(playerid); return 1; } } }