Solved Admin prefixes
Discussion in 'Plugin Requests' started by Tahatired, Mar 3, 2016.
-
Code:
bool OnPlayerChat(NetUser netuser, string message) { if (!permission.UserHasPermission(netUser.playerClient.userID.ToString(), "adminchat.allowed")) { string name = rust.QuoteSafe(netuser.displayName); string msg = rust.QuoteSafe(message); ConsoleNetworker.Broadcast(string.Concat("chat.add ", name, " ", msg)); netUser.NoteChatted(); return false; } else { string prefix = "[Admin]"; string name = rust.QuoteSafe(prefix + netUser.displayName); string msg = rust.QuoteSafe(message); ConsoleNetworker.Broadcast(string.Concat("chat.add ", name, " ", msg)); netUser.NoteChatted(); return false; } }
Last edited by a moderator: Mar 3, 2016 -
-
Moderator edit: Please use the Plugins section for fulfilling public plugin requests.Last edited by a moderator: Mar 16, 2016 -
Can you create me Prefix .lua file pls?
-
yes this plugin is
-
Send it again pls?
-
Try using this
ChatAPI for Rust Legacy | Oxide
example inside plugin .lua and c# -
I would like it if there is a command for Admins/Owners/Moderators so when they type in chat it would be like this [Admin] is everyone alight? Also is it easy to set up? I would like it if I could just past their steam id into the config file and it is done.
-
It looks too difficult to use. I don't get it.
-
-
-