Author Topic: Hiding chat messages?  (Read 1670 times)

How would I make it so that if I say a certain phrase it wouldnt show up in the chat?

You could do this by packaging ServerCmdMessageSent.
Example (Note written on iPhone and not tested)

Package MyPackage
{
function servercmdmessagesent(%text)
{
If(contains word)
{
Return;
}
Else
{
ServerCmdMessageSent(%text);
}}
};

Ignore the above post.

Do you want this to be server or client sided?

What do you mean by hiding a 'certain phrase'? Is that just a part of the message or the whole message? Should it prevent you from sending it, (client or server sided), or remove it when the chat is received (client sided)?

You could do this by packaging ServerCmdMessageSent.
Example (Note written on iPhone and not tested)

Package MyPackage
{
function servercmdmessagesent(%text)
{
If(contains word)
{
Return;
}
Else
{
ServerCmdMessageSent(%text);
}}
};
Please. Stop trying to help people when you don't know what you're doing.

You could do this by packaging ServerCmdMessageSent.
Example (Note written on iPhone and not tested)

Package MyPackage
{
function servercmdmessagesent(%text)
{
If(contains word)
{
Return;
}
Else
{
ServerCmdMessageSent(%text);
}}
};
Please stop posting codes that break or has syntax errors. This is getting annoying. If you don't know what you are coding, don't post here at all. This is not difficult to do.
« Last Edit: April 17, 2014, 03:55:27 PM by Advanced Bot »

Also, is this client sided or server sided?

If it's serversided,
Code: [Select]
package packagenamehere
{
function servercmdmessagesent(%client, %text)
{
if(%text $= "your blocked text here")
{
return;
parent::servercmdmessagesent(%client, %text)
}
else
{
parent::servercmdmessagesent(%client, %text)
}
}
}
activatepackage(packagenamehere);

Clientsided, I don't know. Clientside-mute can provide answers via its code though

Put a semicolon on the last bracket, forgot that

If it's serversided,
Code: [Select]
package packagenamehere
{
function servercmdmessagesent(%client, %text)
{
if(%text $= "your blocked text here")
{
return;
parent::servercmdmessagesent(%client, %text)
}
else
{
parent::servercmdmessagesent(%client, %text)
}
}
}
activatepackage(packagenamehere);

Clientsided, I don't know. Clientside-mute can provide answers via its code though
Let's fix this fail code just in case someone else comes across this topic:
Code: [Select]
package packagenamehere
{
function servercmdmessagesent(%client, %text)
{
if(%text $= "your blocked text here")
return;

parent::servercmdmessagesent(%client, %text);
}
};
activatepackage(packagenamehere);
I don't see the point though. one could easily get around that.

Also, does OP know of etard filter?

You can just put code to be executed a line after an if statement?

If you put "return" in a function, if it gets to it, it will obviously return, it won't go any further into the function.

You can also make return to return things. Like

function cake()
{
    return "cake";
}

talk(cake());

You can just put code to be executed a line after an if statement?
You can execute a line after an if statement (with no brackets) ONLY as long as it's one line (one command/one statement).
Examples:
Code: [Select]
if(%blah)
doSomething();

// This also works:
if(%blah)
if(%blah2)
if(%blah3)
doSomething();


You can execute a line after an if statement (with no brackets) ONLY as long as it's one line (one command/one statement).

Holy stuff I never knew this

You could do this by packaging ServerCmdMessageSent.
Example (Note written on iPhone and not tested)

Package MyPackage
{
function servercmdmessagesent(%text)
{
If(contains word)
{
Return;
}
Else
{
ServerCmdMessageSent(%text);
}}
};

!

Holy stuff I never knew this
You can also do it with other things too.
Code: [Select]
for(%x=0;%x<10;%x++)
doSomething();

// doSomething() will run 10 times.