#include <a_samp>
new str[128];
public OnPlayerText(playerid, text[])
{
if(anty(text) && !IsPlayerAdmin(playerid))
{
format(str,256,\"*** Player %s has been banned from the Server. Reason: advertising IP / PAGE\",PlayerName(playerid));
SendClientMessageToAll(0xFF0000FF, str);
Ban(playerid);
return 0;
}
return 1;
}
stock anty(string[])
{
if(strfind(string,\"www.\",true)!=-1 || strfind(string,\"http://\",true)!=-1 || strfind(string,\".com\",true)!=-1 || strfind(string,\".net\",true)!=-1 || strfind(string,\"91.\",true)!=-1 || strfind(string,\"195.\",true)!=-1 || strfind(string,\".pl\",true)!=-1|| strfind(string,\".org\",true)!=-1)
return true;
return false;
}
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}