add "cmd_server" command which can run a command as server

This commit is contained in:
in0finite 2022-04-22 22:23:57 +02:00
parent b4dee531f2
commit 8f704ba720

View file

@ -22,6 +22,7 @@ namespace SanAndreasUnity.Commands
new CommandManager.CommandInfo("connect", "connect to server", false),
new CommandManager.CommandInfo("exit", "exit application", false),
new CommandManager.CommandInfo("camera_disable", "disable or enable camera", false),
new CommandManager.CommandInfo("cmd_server", "run command as server", false),
};
foreach (var immutableCmd in commands)
@ -64,6 +65,10 @@ namespace SanAndreasUnity.Commands
}
}
}
else if (words[0] == "cmd_server")
{
return CommandManager.Singleton.ProcessCommandAsServer(restOfTheCommand);
}
else if (words[0] == "uptime")
{
response += F.FormatElapsedTime(Time.realtimeSinceStartup);