42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
using CommandSystem;
|
|
using LabApi.Features.Permissions;
|
|
using LabApi.Features.Wrappers;
|
|
|
|
namespace VIPTreatment;
|
|
|
|
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
|
[CommandHandler(typeof(ClientCommandHandler))]
|
|
public class BullshitDetectedCommand : ICommand
|
|
{
|
|
public string Command => "bullshitdetected";
|
|
|
|
public string[] Aliases => [];
|
|
|
|
public string Description => "Broadcasts a message to all players";
|
|
|
|
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
|
{
|
|
if (!Player.TryGet(sender, out var player))
|
|
{
|
|
response = "You must be a player to use this command!";
|
|
return false;
|
|
}
|
|
|
|
if (!player.HasPermissions("viptreatment.wiki"))
|
|
{
|
|
response = "You must have the permission to use this command!";
|
|
return false;
|
|
}
|
|
|
|
foreach (var target in Player.ReadyList)
|
|
{
|
|
target.SendBroadcast("<color=red>⚠️ BULLSHIT DETECTED ⚠️</color>", 5);
|
|
target.SendBroadcast("<color=green>Tipp: Das Wiki hat immer die aktuellsten Informationen!</color>", 5);
|
|
}
|
|
|
|
Cassie.Message("false information yield_0.8 detected yield_01 see V yield_0.2 KEY", true, false, false);
|
|
|
|
response = "Broadcast message sent to all ready players.";
|
|
return true;
|
|
}
|
|
} |