Hello,
I am working on a little Rust plugin that tell the number of connected players when a user says "!pop" in the chat.
It works, but the server print the number of connected player BEFORE the player message.
Here is the code :
void OnPlayerChat(BasePlayer player, string message) {
if (message.Contains("!pop") || message.Contains("!player")) {
var playerCount = BasePlayer.activePlayerList.Count;
PrintToChat("<color=#FF7400>[SERVER]</color> There are currently <color=green>"+playerCount+"</color> players online");
}
}Here is the execution:
Do you know how I can have the player message ("!pop") before the server print the answer ("there are 2 players connected")
Thank you
Michael