Jump to content

script AntiReklama System


___RyDDeRs___

Recommended Posts

Zdravím vás, Toto je můj první FilterScript co dávám sem na forum.

Jedná se o AntiReklamu která  reaguje rychle a dotyčného zabanuje.

FilterScript má 117 Řádku

_____________________________________________________________

Jestli AntiRekala má hráče zabanovat nebo jen kicknout nebo i napomenou můžete změnit na řádku [ 65 , 83 ,  101 ]

Spoiler

/*
///////////////////////////////////////////////////
///                                             ///
///           Anti Reklama System               ///
///             By ___RyDDeRs___                ///
///                                             ///
///////////////////////////////////////////////////
*/
#include <a_samp>

public 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)

{

new string[256] , name[24];

GetPlayerName(playerid, name, 24);

format(string, 256, "{FF0000}[ ANTIREKLAMA ] {00FF00}Hráč {FF0000}%s {00FF00}byl zabanován za {FF0000}Reklamu.", name);

SendClientMessageToAll(0xE10000AA, string);

format(string, sizeof(string), "Reklama");

BanEx(playerid, string);

return 0;

}

if(strfind(text, string3) >= 0)

{

SendClientMessage(playerid, 0xE10000AA, "{FF0000}[ ANTIREKLAMA ]{00FF00}Byl si zabanovám za {FF0000}reklamu.");

new string[256];

format(string, sizeof(string), "Reklama");

BanEx(playerid, string);

return 0;

}

if(strfind(text, string4) >= 0)

{

SendClientMessage(playerid, 0xE10000AA, "{FF0000}[ ANTIREKLAMA ]{00FF00}Byl si zabanovám za {FF0000}reklamu.");

new string[256];

format(string, sizeof(string), "Reklama");

BanEx(playerid, string);

return 0;

}

}

}

}

}

return 0;

}

 

  • Kappa 1
  • Si děláš prdel? :D 3
  • OMEGALUL 2
  • Nope 2
Link to comment
Share on other sites

  • Hlavní moderátor

K hodnocení většiny skriptů se snažím přistupovat s chladnou hlavou, ale... co tohle má být?

Šlechtí tě alespoň to, že je to tvá práce, protože tohle by asi nikdo v životě neudělal. Zkus se zaměřit na něco jednoduššího.

Link to comment
Share on other sites

Dobrý script ;) Hlavne preto že ked ti prídem na server a napíšem do chatu "play.superparba.eu" tak mi to ban nedá :d A keď dáš to launchera IP v tvare play.(doména).(koncovka) tak ti to tam automatický doplní 7777 :d:d Takže.. Kontroluj mená serverov (superparba, WTLS..) a to či zadal IP.. Nie port :d A keby hráč napíše správu "123.123.123.123 dvojbodka 7777" tak by určite dostal ban :d Pozri si čo je na SAMP Fóre, aké su tam antireklamy.. Lebo toto je AntiPort, nič to neochráni :d

  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

Zbytečnost. Kdo se bojí reklamy (a zmínka IP adresy jiného serveru skutečně reklama není), měl by zapracovat na originalitě vlastního serveru. Dobří hráči zůstávají, špatní hráči chybět nebudou. Ke skriptu samotnému se radši vyjadřovat ani nebudu, ale doporučuji přečíst si něco o složitosti algoritmů.

Edited by IllidanS4
Link to comment
Share on other sites

  • 2 weeks later...

Tento script je od Om3na z roku asi 2011. 

 

EDIT: 10 sekúnd na googli a našiel som to 

 

#include <a_samp>




public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("         Anti-reklama by Om3n");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}



public OnPlayerText(playerid, text[])
{
//--------------------------------------------------------

	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;
}

 

  • Haha! 1
Link to comment
Share on other sites

  • Ewwe locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...