02.12.2010, 16:06
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)
(sorry if my english is bad)
f(strfind("Everyone come to ...", "82.77", true) != -1) //returns 4 (!= -1 because -1 would be 'not found')
{
Kick(playerid);
}
pawn Код:
|
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] = '*' ; } }
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] = '*' ; } } (sorry if my english is bad) |
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
}
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(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;
}
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 Код:
|
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 Код:
|