Jump to content
  • 0

Anti-Reclama !


zroT

Question

Salut.

Am si eu nevoie de un script anti-reclama, dar playerul respectiv sa nu primeasca kick sau ban, ci sa apara un worring adminilor, indiferent pe ce chat este scris acel IP  De exemplu: /ooc /say /family /admin etc......

PS: Am nevoie urgent de acest script, am vazut pe cateva servere...

stats.php?page=2&ip=samp.zonek.ro&port=7777
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

if(FindIP(result)) /// Anti-Reclama
    		{
		                new advertiser[MAX_PLAYER_NAME];
				 GetPlayerName(playerid, advertiser, sizeof(advertiser));
				 format(string, sizeof(string), "AdmCmd: %s , reason: Server Advertising",advertiser);
				 ABroadCast(COLOR_LIGHTRED,string);
		                return 1;
    		}

FindIP(StrToChk[])
{
	new IpLevel = 0;
	for(new a = 0; a < strlen(StrToChk); a++)
	{
		switch(IpLevel)
		{
			case 0:
			{
	    		if(IsNum(StrToChk[a])) IpLevel++;
			}
			case 1, 2:
			{
                if(IsNum(StrToChk[a])) IpLevel++;
                else if(StrToChk[a] == '.') IpLevel = 4;
                else IpLevel = 0;
			}
			case 3:
			{
			    if(StrToChk[a] == '.') IpLevel++;
			    else IpLevel = 0;
			}
			case 4:
			{
			    if(IsNum(StrToChk[a])) IpLevel++;
			    else IpLevel = 0;
			}
			case 5, 6:
			{
                if(IsNum(StrToChk[a])) IpLevel++;
                else if(StrToChk[a] == '.') IpLevel = 8;
                else IpLevel = 0;
			}
			case 7:
			{
			    if(StrToChk[a] == '.') IpLevel++;
			    else IpLevel = 0;
			}
			case 8:
			{
			    if(IsNum(StrToChk[a])) IpLevel++;
			    else IpLevel = 0;
			}
			case 9, 10:{
                if(IsNum(StrToChk[a])) IpLevel++;
                else if(StrToChk[a] == '.') IpLevel = 12;
                else IpLevel = 0;
			}
			case 11:
			{
			    if(StrToChk[a] == '.') IpLevel++;
			    else IpLevel = 0;
			}
			case 12:
			{
			    if(IsNum(StrToChk[a])) return 1;
                else IpLevel = 0;
   			}
  		}
	}
	return 0;
}
IsNum(textchar)
{
	if(textchar == '0') return 1;
	if(textchar == '1') return 1;
	if(textchar == '2') return 1;
	if(textchar == '3') return 1;
	if(textchar == '4') return 1;
	if(textchar == '5') return 1;
	if(textchar == '6') return 1;
	if(textchar == '7') return 1;
	if(textchar == '8') return 1;
	if(textchar == '9') return 1;
	return 0;
}

Sper sa mearga nush :D

Link to comment
Share on other sites

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(8673) : warning 202: number of arguments does not match definition

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(8851) : warning 202: number of arguments does not match definition

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(8853) : warning 202: number of arguments does not match definition

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(8855) : warning 202: number of arguments does not match definition

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(30939) : warning 204: symbol is assigned a value that is never used: "text6"

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(36027) : error 017: undefined symbol "result"

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(36032) : warning 202: number of arguments does not match definition

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(36036) : error 017: undefined symbol "StrToChk"

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(36039) : error 017: undefined symbol "StrToChk"

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(36045) : error 017: undefined symbol "StrToChk"

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(36045) : warning 215: expression has no effect

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(36045) : error 001: expected token: ";", but found "]"

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(36045) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Admin\Desktop\ATOCS SAMP\gamemodes\atocs.pwn(36045) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

7 Errors.

stats.php?page=2&ip=samp.zonek.ro&port=7777
Link to comment
Share on other sites

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.