Hi I was wondering if there was a way to do it so when someone joins the server it pops up in chat or the top of the players screen. "Welcome to the Server please do /rules and /help"
Solved /help and /rules after Join
Discussion in 'Plugin Requests' started by My Name is Jeff, Aug 29, 2016.
-
Code:
void OnPlayerConnected(NetUser netUser) { rust.Notice("Welcome to the Server please do /rules and /help"); return; }
-
Where do I put this? I am using Announcer plugin.
-
Code:
private void OnPlayerConnected(NetUser player) { if (!watcherEnabled) return; var message = string.Format(joined, player.displayName); if (log) Log(message); if (showChatPrefixW) BroadcastMessage(chatPrefix, message); else BroadcastMessage(message); rust.Notice("Welcome to the Server please do /rules and /help"); return; }
-
I get error
(17:35:37) | [Oxide] 22:35 [Error] Announcer plugin failed to compile!
(17:35:37) | [Oxide] 22:35 [Error] Announcer.cs(96,18): error CS1501: No overload for method `Notice' takes `1' arguments -
Code:
private void OnPlayerConnected(NetUser player) { rust.Notice(player,"Welcome This Server Use: /help or /rules!", "!", 20); if (!watcherEnabled) return; var message = string.Format(joined, player.displayName); if (log) Log(message); if (showChatPrefixW) BroadcastMessage(chatPrefix, message); else BroadcastMessage(message); }
-
Thank You so much. Also is there a way I can do it so it pops up in chat as well.
-
Code:
private void OnPlayerConnected(NetUser player) { rust.Notice(player,"Welcome This Server Use: /help or /rules!", "!", 20); rust.SendChatMessage(player, "Welcome This Server Use: /help or /rules!"); if (!watcherEnabled) return; var message = string.Format(joined, player.displayName); if (log) Log(message); if (showChatPrefixW) BroadcastMessage(chatPrefix, message); else BroadcastMessage(message); }
-
Thanks.
-
Put as resolved
-
Is it hard to do it so if a new player joins it says "Player has joined the server for the first time"
-
This plugin has this function.
Administration for Rust Legacy | Oxide
Code:void OnPlayerConnected(NetUser netUser) { if (!messageJoin) return; ulong netUserID = netUser.userID; if (!(permission.UserHasPermission(netUserID.ToString(), permissionHasPlayedBefore))) { rust.BroadcastChat(lang.GetMessage("ChatPrefix", this), $"{netUser.displayName} {lang.GetMessage("FirstTimeJoin", this)}"); rust.RunClientCommand(netUser, $"deathscreen.reason \"{lang.GetMessage("WarningMessage", this)}\""); rust.RunClientCommand(netUser, "deathscreen.show"); permission.GrantUserPermission(netUserID.ToString(), permissionHasPlayedBefore, this); Puts($"{netUser.displayName} [{netUserID.ToString()}] [{netUser.networkPlayer.ipAddress}] {lang.GetMessage("FirstTimeJoin", this)}"); return; } rust.BroadcastChat(lang.GetMessage("ChatPrefix", this), $"{netUser.displayName} {lang.GetMessage("NormalJoin", this)}"); Puts($"{netUser.displayName} [{netUserID.ToString()}] [{netUser.networkPlayer.ipAddress}] {lang.GetMessage("NormalJoin", this)}"); return; }
-
So do I do this in the Administration plugin?
-
It is one of the option
-
If I use the Administration one is there a way to do the "Please do /help and /rules" when they join like Announcer?
-
yes and now want something better