Hello
I want when a player uses the following command:
/do yes
His message will appear in a different color in chat (with his name):
yes
plz help me![]()
Solved Showing player's name with chat command?
Discussion in 'Rust Development' started by Novaa, Apr 4, 2018.
-
Wulf Community Admin
Are you wanting a plugin or are you asking how to do it? The Docs and existing plugins have examples of how to make commands.
-
Yes, but I'm starter And I dont know how to reply the user's message with his name's
Can you explain the way to make this plugin? -
Code:
[ChatCommand("do")] private void DoCmd(BasePlayer player, string command, string[] args) { SendReply(player, $"<color=purple>yes {player.displayName}</color>"); }
-
Example:
/do "player message"
And also show her message in chat (for everyone).Last edited by a moderator: Apr 5, 2018 -
Example:
/do "player message"
show:
"player name"+"player message"
And also show her message in chat (for everyone). can u help me? -
Wulf Community Admin
-
-
http://uupload.ir/files/0ytq_do.jpg
This will happen:
http://uupload.ir/files/ta30_20180406201946_1.jpg -
-
-
-
Code:
[ChatCommand("do")] private void DoCmd(BasePlayer player, string command, string[] args) { SendReply(player, $"{player.displayName}: <color=purple>yes (({player.displayName}))</color>"); }
-
Example:
/do "player message"
show:
"player name"+"player message" -
Add me on Discord Sonny-Boi#0768
-