Command to send a private message from the server
Xinayder opened this issue ยท 5 comments
I had it working, but it's deprecated since it's a feature.
We should get it onto 0.1.4 or wait 'till 0.1.5?
And the API? I know "exactly" how to do it so: make a dll with the functions instead. that way, we can, for example, have a function SendChatMessageToClient(ClientObject client, string message) and use it externally.
Let's get it into 0.1.4, I'll tackle this one if you want :)
Just /pm playername text, although players can have spaces so you'll want to be careful with that.
EDIT: Let's get it working for the channels too.
Which I think that it should be removed (or not). If the player name is Test Player, the command would send the message Player to the client Test.
Instead of spaces, have underlines/scores.
Player names can have underscores too :P.
You will need to iterate over the current player list checking the commandArgs with .StartsWith(playerName) and double check that indexof(playerName.Length) is a space.
As I said, I can do this one - it's an easy one, but it does need a little thought :P
Do you mind if I add the command and you just tweak it? for the thing you've said.