[HELP]Anti-IP advertising -
Nenad - 02.12.2010
I need FS that will block typing IP adress into /ad, /b, /ooc, /pm, /n, /a and normal chat...can somebody please help me with this 
(
sorry if my english is bad)
Re: [HELP]Anti-IP advertising -
SkizzoTrick - 02.12.2010
pawn Код:
f(strfind("Everyone come to ...", "82.77", true) != -1) //returns 4 (!= -1 because -1 would be 'not found')
{
Kick(playerid);
}
If this is what youve been searching
Re: [HELP]Anti-IP advertising -
[JnA]DukeNukem - 02.12.2010
To traži 82.77 u tekstu,a šta ako je ip npr. 90.67?
That is working in case that the ip is 82.77 but what if it is different?
Pozdrav
Re: [HELP]Anti-IP advertising -
Nenad - 02.12.2010
Quote:
Originally Posted by SkizzoTrick
pawn Код:
f(strfind("Everyone come to ...", "82.77", true) != -1) //returns 4 (!= -1 because -1 would be 'not found') { Kick(playerid); }
If this is what youve been searching
|
no...i want to block/hide IP adress that are entered in /ad, /b, /ooc, /pm, /n, /a and normal chat...i know how to hide IP adress that are placed in normal chat but I need to edit my GM and i dont know how to do this on other chats.....and i wont it to be FS so i don't need to edit my GM
Код:
new brojevi[] = { '1','2','3','4','5','6','7','8','9'};
for(new b = 0; b < sizeof brojevi; b++)
{
new tekst = strlen(text);
for(new i = 0; i<tekst; i++)
{
if(text[i] == brojevi[b])
text[i] = '*' ;
}
}
it looks like this when i edit my GM to hide IP numbers that are entered in normal chat...it replaces the numbers with stars
(
sorry if my english is bad)
Re: [HELP]Anti-IP advertising -
SkizzoTrick - 02.12.2010
Quote:
Originally Posted by Nenad
no...i want to block/hide IP adress that are entered in /ad, /b, /ooc, /pm, /n, /a and normal chat...i know how to hide IP adress that are placed in normal chat but I need to edit my GM and i dont know how to do this on other chats.....and i wont it to be FS so i don't need to edit my GM
Код:
new brojevi[] = { '1','2','3','4','5','6','7','8','9'};
for(new b = 0; b < sizeof brojevi; b++)
{
new tekst = strlen(text);
for(new i = 0; i<tekst; i++)
{
if(text[i] == brojevi[b])
text[i] = '*' ;
}
}
it looks like this when i edit my GM to hide IP numbers that are entered in normal chat...it replaces the numbers with stars
( sorry if my english is bad)
|
Wow,you putted there something that hides all the numbers?

)i don't think that that's the best thing you can do

Better try this:
pawn Код:
public OnPlayerText(...)
{
if(strfind("Everyone come to ...", "82.77", true) != -1) //returns 4 (!= -1 because -1 would be 'not found')
{
//Put here the punish
}
else if(strfind("Giving admin at", "192.77", true) != -1) //returns 4 (!= -1 because -1 would be 'not found')
{
//Put here the punish
}
Re: [HELP]Anti-IP advertising -
Nenad - 02.12.2010
Quote:
Originally Posted by SkizzoTrick
Wow,you putted there something that hides all the numbers?  )i don't think that that's the best thing you can do 
Better try this:
pawn Код:
public OnPlayerText(...) { if(strfind("Everyone come to ...", "82.77", true) != -1) //returns 4 (!= -1 because -1 would be 'not found') { //Put here the punish } else if(strfind("Giving admin at", "192.77", true) != -1) //returns 4 (!= -1 because -1 would be 'not found') { //Put here the punish }
|
no...i like it my way...because i dont want people to put numbers in chat anyway xD that is why i need to hide/block numbers typed in all chats and i dont know how to do it
(
sorry if my english is bad)
Re: [HELP]Anti-IP advertising -
Vince - 02.12.2010
Quote:
Originally Posted by SkizzoTrick
Text
|
I'm sorry, but that is just incredibly dumb. Are you gonna edit your script every time someone shouts out a new ip in the chat?
pawn Код:
public OnPlayerText(playerid, text[])
{
new
result[128] = text;
for(new i = 0, j = strlen(result); i < j; i++)
{
if('0' <= result[i] <= '9')
{
result[i] = '*';
}
}
SendPlayerMessageToAll(playerid, result);
return 0;
}
This will filter out ANY numbers typed into the chat box.
Edit: result has to be a string as well, my bad.
Re: [HELP]Anti-IP advertising -
Biesmen - 02.12.2010
Quote:
Originally Posted by Vince
I'm sorry, but that is just incredibly dumb. Are you gonna edit your script every time someone shouts out a new ip in the chat?
pawn Код:
public OnPlayerText(playerid, text[]) { new result = text;
for(new i = 0, j = strlen(result); i < j; i++) { if('0' <= result[i] <= '9') { result[i] = '*'; } }
SendPlayerMessageToAll(playerid, result); return 0; }
This will filter out ANY numbers typed into the chat box.
|
That's extremely smart and extremely good.
Re: [HELP]Anti-IP advertising -
WillyP - 02.12.2010
Quote:
Originally Posted by Vince
I'm sorry, but that is just incredibly dumb. Are you gonna edit your script every time someone shouts out a new ip in the chat?
-epic code-
This will filter out ANY numbers typed into the chat box.
|
That's awesome!
Re: [HELP]Anti-IP advertising -
Nenad - 02.12.2010
Quote:
Originally Posted by Vince
I'm sorry, but that is just incredibly dumb. Are you gonna edit your script every time someone shouts out a new ip in the chat?
pawn Код:
public OnPlayerText(playerid, text[]) { new result = text;
for(new i = 0, j = strlen(result); i < j; i++) { if('0' <= result[i] <= '9') { result[i] = '*'; } }
SendPlayerMessageToAll(playerid, result); return 0; }
This will filter out ANY numbers typed into the chat box.
|
it gives me 26 errors and 2 warrnings when i put this code into my GM xDD
can u please make FS like this