Jump to content
  • 0

Question

Posted

Cum fac ca atunci cand un player scrie de ex: haideti pe 111.222.111.333:7777 sa cenzureze cifrele ? Adica de ex dupa ce el spune asta, sa apara pe chat : haideti pe ***.***.***:**** ?

Pentru ca acum la mine, cand cineva intra si zice haideti pe 111.222.111.333:7777 ii da ban, dar daca scrie haideti pe111.222.111.333:7777 apare pe chat IP-ul, si asta fiindca a scris pe111.222.111.333:7777 LEGAT.

www.youtube.com/thebwgg

1 answer to this question

Recommended Posts

Posted

La OnPlayerText:

[pawn] if( FindIP(text) )

{

SendClientMessage(playerid, COLOR_RED, "You have kicked for Guardian , because you write an IP Adrees.");

new advertiser[MAX_PLAYER_NAME];

GetPlayerName(playerid, advertiser, sizeof(advertiser));

format(string, sizeof(string), "  %s was kicked for Server Advertising",advertiser);

SendClientMessageToAll(0xFF9347AA,string);

Kick(playerid);

return 0;

}[/pawn]

si Functia findIP

[pawn]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;

}

[/pawn]

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.