Jump to content

Anti-Reklama (by Om3n)


Om3n

Recommended Posts

Tak tuhle anti-reklamu sem udelal uz pred nejakou dobou...funguje tak ze kontroluje pokud hrac napise v textu port serveru...neni to zase tak dokonaly ale 90% reklam to pochyta. Davam vam to sem v pwn.

hint.jpg

 

ps: Pridano na prani Tudora

Link to comment
Share on other sites

  • Replies 84
  • Created
  • Last Reply

Top Posters In This Topic

public OnPlayerText(playerid, text[])
{
if(strfind(text, "www.") >= 0)
{
SendClientMessage(playerid, 0xE10000AA, "To byl blbej pokus o reklamu :)");
new string[256];
format(string, sizeof(string), "REKLAMA");
BanEx(playerid, string);
return 0;
}
else if(strfind(text, "WWW.") >= 0)
{
SendClientMessage(playerid, 0xE10000AA, "To byl blbej pokus o reklamu :)");
new string[256];
format(string, sizeof(string), "REKLAMA");
BanEx(playerid, string);
return 0;
}
return 1;
}

 

a delej si s tim co chces...melo by to bejt spravne :d

Link to comment
Share on other sites

  • 2 weeks later...
public OnPlayerText(playerid, text[])
{
if(strfind(text, "www.") >= 0)
{
SendClientMessage(playerid, 0xE10000AA, "To byl blbej pokus o reklamu :)");
new string[256];
format(string, sizeof(string), "REKLAMA");
BanEx(playerid, string);
return 0;
}
else if(strfind(text, "WWW.") >= 0)
{
SendClientMessage(playerid, 0xE10000AA, "To byl blbej pokus o reklamu :)");
new string[256];
format(string, sizeof(string), "REKLAMA");
BanEx(playerid, string);
return 0;
}
return 1;
}

 

a delej si s tim co chces...melo by to bejt spravne :d

 

diki toto som hladal ;)

Link to comment
Share on other sites

public OnPlayerText(playerid, text[])
{
if(strfind(text, "www.") >= 0)
{
SendClientMessage(playerid, 0xE10000AA, "To byl blbej pokus o reklamu :)");
new string[256];
format(string, sizeof(string), "REKLAMA");
BanEx(playerid, string);
return 0;
}
else if(strfind(text, "WWW.") >= 0)
{
SendClientMessage(playerid, 0xE10000AA, "To byl blbej pokus o reklamu :)");
new string[256];
format(string, sizeof(string), "REKLAMA");
BanEx(playerid, string);
return 0;
}
return 1;
}

 

a delej si s tim co chces...melo by to bejt spravne :d

 

diki toto som hladal ;)

 

I když dneska se moc www nepoužívá :d

Link to comment
Share on other sites

  • 3 weeks later...

i kdyby tak co?:d:D:D me to je jedno...ja si na to zadny autorsky prava nedelam :d a kdyby mi to jedno nebylo tak tady nezverejnim pwn...ale aspon se mozna z toho scriptu nekdo necemu priuci

Link to comment
Share on other sites

tak tenhle typ lamy se jen tak nevidi, zadna snaha a jen tri slova to umi "udelejte mi to"

na to je spousta reakci ale jen jedna ktera neni vulgarni "Bez snahy ničeho nedosáhneš aneb stahni si pawno a uč se"

Link to comment
Share on other sites

lol...tedka sem se nad tim zamyslel a je tam chyba :d:D:D...pokud nekdo napise IP:PORT a v tom portu bude cislo 9 tak to neblokne a nezabanuje :d...dystak si prepis tu 9 na 10 a nebo "<" na "<="

Link to comment
Share on other sites

Nevíte jak mám přidat k té antireklamě to že v chatu kdyby někdo napsal tak by se zobrazilo Nick (ID: 0): text zkoušel jsem to takto:

new string[256];
format(string, sizeof(string), "(ID:%d) %s", playerid, text);
SendPlayerMessageToAll(playerid, string);
for(new ip1=1;ip1 < 9; ip1++)
{
	for(new ip2=0;ip2 < 9; ip2++)
	{
           for(new ip3=0;ip3 < 9; ip3++)
		{
			for(new ip4=0;ip4 < 9; ip4++)
			{

				new string2[16];
				format(string2, sizeof(string2), ":%d%d%d%d", ip1, ip2, ip3, ip4);
				new string3[16];
				format(string3, sizeof(string3), ": %d%d%d%d", ip1, ip2, ip3, ip4);
				new string4[16];
				format(string4, sizeof(string3), ": %d %d %d %d", ip1, ip2, ip3, ip4);

				if(strfind(text, string2) >= 0)
				{
					SendClientMessage(playerid, 0xE10000AA, "Banned. No advertising .");
					SendClientMessage(playerid, 0xE10000AA, "For unban write to www.ZombiesEra.tk .");

					new string[256];
					format(string, sizeof(string), "advertising");
					BanEx(playerid, string);
                       return 0;
				}
				if(strfind(text, string3) >= 0)
				{
					SendClientMessage(playerid, 0xE10000AA, "Banned. No advertising .");
					SendClientMessage(playerid, 0xE10000AA, "For unban write to www.ZombiesEra.tk .");

					new string[256];
					format(string, sizeof(string), "advertising");
					BanEx(playerid, string);
                       return 0;
				}
				if(strfind(text, string4) >= 0)
				{
					SendClientMessage(playerid, 0xE10000AA, "Banned. No advertising .");
					SendClientMessage(playerid, 0xE10000AA, "For unban write to www.ZombiesEra.tk .");

					new string[256];
					format(string, sizeof(string), "advertising");
					BanEx(playerid, string);
                       return 0;
				}
			}
		}
	}


}
return 1;
}

ale toto nefunguje když se pak napíše v chatu tak to napíše Nick + id a hned podtím to samé akorád bez id, předem moc díky

Link to comment
Share on other sites

udešlej to takhle...ale do modu si to vloz...jinak by to mohlo blbnout jako FS:

OnPLayerText(playerid,text[])
{
for(new ip1=1;ip1 < 10; ip1++)
  {
     for(new ip2=0;ip2 < 10; ip2++)
     {
           for(new ip3=0;ip3 < 10; ip3++)
        {
           for(new ip4=0;ip4 < 10; ip4++)
           {

              new string2[16];
              format(string2, sizeof(string2), ":%d%d%d%d", ip1, ip2, ip3, ip4);
              new string3[16];
              format(string3, sizeof(string3), ": %d%d%d%d", ip1, ip2, ip3, ip4);
              new string4[16];
              format(string4, sizeof(string3), ": %d %d %d %d", ip1, ip2, ip3, ip4);

              if(strfind(text, string2) >= 0)
              {
                 SendClientMessage(playerid, 0xE10000AA, "Banned. No advertising .");
                 SendClientMessage(playerid, 0xE10000AA, "For unban write to www.ZombiesEra.tk .");

                 new string[256];
                 format(string, sizeof(string), "advertising");
                 BanEx(playerid, string);
                       return 0;
              }
              if(strfind(text, string3) >= 0)
              {
                 SendClientMessage(playerid, 0xE10000AA, "Banned. No advertising .");
                 SendClientMessage(playerid, 0xE10000AA, "For unban write to www.ZombiesEra.tk .");

                 new string[256];
                 format(string, sizeof(string), "advertising");
                 BanEx(playerid, string);
                       return 0;
              }
              if(strfind(text, string4) >= 0)
              {
                 SendClientMessage(playerid, 0xE10000AA, "Banned. No advertising .");
                 SendClientMessage(playerid, 0xE10000AA, "For unban write to www.ZombiesEra.tk .");

                 new string[256];
                 format(string, sizeof(string), "advertising");
                 BanEx(playerid, string);
                       return 0;
              }
           }
        }
     }
   }
    new string[256];
    format(string, sizeof(string), "(ID:%d) %s", playerid, text);
    SendPlayerMessageToAll(playerid, string); 

  return 0;
}

tedka vlastne to nejdriv prohlidne text zpravy jestli to neni reklama...potom to posle zpravu do chatu za toho hrace i s jeho ID...a pak to ukonci funkci jelikoz tam je return 0;...tak to neodesle tu klasickou zpravu.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...