Code:class Ping : CovalencePlugin { [Command("ping")] void PingCommand(IPlayer player, string command) { Singleton<AlertManager>.Instance.GenericTextNotificationServer($"Your ping: {player.Ping}"); } }
Solved Sending a chat message to a player?
Discussion in 'Hurtworld Development' started by ЯЗакон, Jul 4, 2017.
-
Wulf Community Admin
Because you're using a method that sends it to all players, not a specific one.
-
-
Wulf Community Admin
-
Code:
class Ping : CovalencePlugin { [Command("ping")] void PingCommand(PlayerSession session, string command) { Singleton<AlertManager>.Instance.GenericTextNotificationServer($"Ваш пинг: {player.Ping}", session.Player); } }
I need CovalencePlugin
rather than HurtworldPlugin -
Wulf Community Admin
[DOUBLEPOST=1499172873,1499172777][/DOUBLEPOST]
- player.Reply
- player.Message
-
Help I can not find instead (ping) online
Code:class Ping : HurtworldPlugin { [ChatCommand("ping")] void cmdsetexp(PlayerSession session, string command) { Singleton<AlertManager>.Instance.GenericTextNotificationServer($"Ping: {session.Player.Connected.Count()}", session.Player); } }
Last edited by a moderator: Jul 4, 2017 -
where the Magnifier JustDecompiler
[DOUBLEPOST=1499175378][/DOUBLEPOST]more accurate search -
-
-
Code:
[ChatCommand("ping")] void pingCommand(PlayerSession session, string command) { hurt.SendChatMessage(session, "Your Ping is: "+session.Player.averagePing); } [ChatCommand("playercount")] void playercountCommand(PlayerSession session, string command) { hurt.SendChatMessage(session, "Online players: "+GameManager.Instance.GetPlayerCount()); }
You can find a list of Plugins for Hurtworld Here: Hurtworld | Oxide