All pastes #617780 Raw Edit

Hide IP 2.0v by Luby

public cpp v1 · immutable
·published 2007-07-13 14:11 UTC
rendered paste body
#include <a_samp>#define ILE_KICK 3new Count[200]={0,...};public OnFilterScriptInit(){ print("AntyIP 2.0v by Luby - Uruchomiono"); return 1;}public OnPlayerConnect(playerid){ Count[playerid]=0; return 1;}public OnPlayerText(playerid, text[]){ new Adress1; new Adress2; new Adress3; new g, cache; new Textbackup[256]; for(new i=0;i<strlen(text);i++){  Textbackup[i] = text[i]; } while (g < 3){  cache = strfind(Textbackup, ".", false);  Textbackup[cache] = '|';  switch(g){   case 0: Adress1 = cache;   case 1: Adress2 = cache;   case 2: Adress3 = cache;  }  g++; } if(Adress1!=-1 && Adress2!=-1 && Adress3!=-1){  if(Adress3 - Adress2 <= 4)if(Adress2 - Adress1 <= 4)   if(Adress1+1!=Adress2 && Adress2+1!=Adress3){    new str1[256], str2[256], str3[256];    strmid(str1, text, Adress1, Adress2, 256);    strmid(str2, text, Adress2, Adress3, 256);    strmid(str3, text, Adress3, Adress3+1, 256);    if(strlen(str1) && strlen(str2)){     Count[playerid]++;     if(Count[playerid] >= ILE_KICK){      new str[256], Name[64];      GetPlayerName(playerid, Name, 64);      format(str,256,"*** Gracz %s został wyrzucony z Servera. Powód : Reklamowanie IP", Name);      SendClientMessageToAll(0xFF0000FF, str);      Kick(playerid);     }     return 0;   }  } } return 1;}