Quote:
Originally Posted by Vince
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; } }
|
This doesn't work fully, when I type "Hey
www.advertisment.com is much better then
www.yourownwebsite.com"
This doesn't get blocked