using Rust;
namespace Oxide.Plugins
{
[Info("wipe", "qw", "0.1.0")]
public class wipe : RustPlugin
{
void OnPlayerChat(ConsoleSystem.Arg arg)
{
var message = arg.GetString(0);
if (message.Contains("wipe"))
{
PrintToChat($"Full Wipe was 13.11 in 17:00 CET");
PrintToChat("<color=red>Last Map Wipe was 30.11 in 16:00 CET</color>");
PrintToChat("<color=red>Next Map Wipe will be 05.12 after update</color>");
PrintToChat("Next Full Wipe will be 05.12 after update");
}
}
}
} Updating for OnPlayerChat change?
Take a look at changelog and docs, it's `BasePlayer, string, Chat.ChatChannel` now.
using Rust;
namespace Oxide.Plugins
{
[Info("wipe", "qw", "0.1.0")]
public class wipe : RustPlugin
{
void OnPlayerChat(BasePlayer, string, Chat.ChatChannel)
{
var message = arg.GetString(0);
if (message.Contains("wipe"))
{
PrintToChat($"<color=#FF7400> RUSTICAL WIPE</color>");
PrintToChat("<color=#B1B1B1>Full Wipe was 05.12 after update</color>");
PrintToChat("<color=red>Last Map Wipe was 05.12 after update</color>");
PrintToChat("<color=red>Next Map Wipe will be 12.12 16:00CET</color>");
PrintToChat("<color=#B1B1B1>Next Full Wipe will be 02.01 after update</color>");
}
}
}
}Merged post
Still not working.
You're missing a using statement, which both your IDE and compiler should show you.
using ConVar;
using ConVar;
Still having this problem: https://prnt.sc/q6u0o0
Consider adding parameters names. If you're not familiar with plugins development you may ask someone to help you.
Example: `void OnPlayerChat(BasePlayer player, string message, Chat.ChatChannel channel)`
You should also remove your message variable declaration inside the method since you don't need it anymore and you don't have arg anymore.
Example: `void OnPlayerChat(BasePlayer player, string message, Chat.ChatChannel channel)`
You should also remove your message variable declaration inside the method since you don't need it anymore and you don't have arg anymore.