[NAK_CVR_MODS] some cleanup to repo

This commit is contained in:
NotAKidoS 2024-04-23 16:01:33 -05:00
parent 9944ad7611
commit 926cdcef66
16 changed files with 183964 additions and 1350 deletions

View file

@ -39,5 +39,53 @@ internal class ChatBoxCommands : CommandBase
API.SendMessage($"You have to ping first, {GetPlayerUsername(sender)}!", false, true, true);
});
});
Commands.RegisterCommand("sudo",
onCommandSent: (message, sound, displayMsg) =>
{
LocalCommandIgnoreOthers(message, args =>
{
if (args.Length > 1)
{
string command = string.Join(" ", args.Skip(1));
API.SendMessage($"/{command}", false, true, true);
}
});
},
onCommandReceived: (sender, message, sound, displayMsg) =>
{
RemoteCommandListenForAll(message, args =>
{
if (args.Length > 1)
{
string command = string.Join(" ", args.Skip(1));
API.SendMessage($"/{command}", false, true, true);
}
});
});
Commands.RegisterCommand("say",
onCommandSent: (message, sound, displayMsg) =>
{
LocalCommandIgnoreOthers(message, args =>
{
if (args.Length > 0)
{
string text = string.Join(" ", args);
API.SendMessage(text, false, true, true);
}
});
},
onCommandReceived: (sender, message, sound, displayMsg) =>
{
RemoteCommandListenForAll(message, args =>
{
if (args.Length > 0)
{
string text = string.Join(" ", args);
API.SendMessage(text, false, true, true);
}
});
});
}
}