03.03.2012, 10:14
Possibly something like this, put under OnPlayerText;
pawn Код:
static const TLD[][] = { ".com", ".net", ".org", ".info", ".ru", ".ro", ".pl", ".tk", ".cc" /* add more as you see fit */ };
for(new i; i < sizeof(TLD); i++)
{
if(strfind(text, TLD[i], true) != -1)
{
if(strfind(text, "www.yourownwebsite.com", true) != -1) break; // Filter out your own website
SendClientMessage(playerid, COLOR_RED, "No Advertising!");
Kick(playerid);
return 0;
}
}