// Required for uMod (Oxide) API
using Oxide.Core;
// Namespace for the plugin
namespace Oxide.Plugins
{
// Plugin basic information
[Info("Hello World", "YourName", "1.0.0")]
[Description("Displays a welcome message when a player logs in.")]
// Main class that inherits from RustPlugin
class HelloWorld : RustPlugin
{
// Hook called when a player has finished initializing
void OnPlayerInit(BasePlayer player)
{
// Check if the player object is not null and is connected
if (player != null && player.IsConnected)
{
// Send a message to the target player's chat
player.ChatMessage("hello world");
}
}
}
} Do you think this code would work as a plugin?
Already use WelcomeMessages plugin since 2016
pookins
Already use WelcomeMessages plugin since 2016
This was all written by generative AI.
Can I use plugins that are not approved by umod on my server?
That hook doesn't exist, it hasn't for years I believe.
Yes you can use any plugins just put them in oxide/plugins folder
OnPlayerInitThat hook was changed years ago.. AI is Old Code and should be only used as a helper not to code hole plugins.
it now
void OnPlayerConnected(BasePlayer player)
I created a plugin that executes certain commands when the player performs certain actions, and it's working well.