Hi guys I am learning coding for C# and am making a basic script for my Server so that when people say something it displays in chat
eg
LOL is said by <playername>
in chat itll be like
<playername> said => Laugh Out Loud
Now I want to Hide What a players says i.e in this case i want to hideLOL
Anyone know how I can hide what a player says?
(03-27-2013, 21:46)dhanin Wrote: [ -> ]Hi guys I am learning coding for C# and am making a basic script for my Server so that when people say soething it displays in chat eg
LOL is said by player
in console itll be like
<playername> said => Laugh Out Loud
Now I want to Hide What a players says i.e in this case LOL
Anyone know how I can hide what a player says?
do you mean that u want hide commands or chats?
because if u want hide a chat of a player u must take a look here:
http://www.itsmods.com/forum/Thread-Rele...ocker.html
of u want hide a command what u type (example: !admin) than u must type in C#
if (Message.StartsWith("!admin")) but than its !ADMIN not working if u want that u can type !ADMIN too than u can set in C#
if (Message.ToLower().StartsWith("!admin"))
good luck, X-Track
Thanks for replying so fast
Anyway I want to hide the command
Can you explain again cause I didnt quite get you here, I understood where we check what a use has inputted
Quote:but than its !ADMIN not working if u want that u can type !ADMIN too than u can set in C# if (Message.ToLower().StartsWith("!admin"))
good luck, X-Track
CSHARP Code
public override ChatType OnSay(string Message, ServerClient Client)
{
if (Message == "LOL")
{
ServerSay(Client.Name+" said LOL", true);
return ChatType.ChatNone;
}
return ChatType.ChatContinue;
}
I think you meant ChatType.ChatNone, in this example it will hide the message and show <clientname> said LOL
Lmao. Hja guys reply so fast i think that they are all time connected waiting for a new post to comment