alias team_yellow "cmd selectteam yellow; cmd join"
alias team_auto "cmd selectteam auto; cmd join"
-alias spec "spectate"
+alias spec "spectate ${* ?}"
// mutator aliases
alias sandbox "cmd g_sandbox ${* ?}"
{
if (!intermission_running && IS_CLIENT(caller))
{
+ if((IS_SPEC(caller) || IS_OBSERVER(caller)) && argv(1) != "")
+ {
+ entity client = GetFilteredEntity(argv(1));
+ int spec_accepted = VerifyClientEntity(client, false, false);
+ if(spec_accepted > 0 && IS_PLAYER(client))
+ {
+ if(Spectate(caller, client))
+ return; // fall back to regular handling
+ }
+ }
+
int mutator_returnvalue = MUTATOR_CALLHOOK(ClientCommand_Spectate, caller);
if (mutator_returnvalue == MUT_SPECCMD_RETURN) return;
default:
case CMD_REQUEST_USAGE:
{
- sprint(caller, "\nUsage:^3 cmd spectate\n");
- sprint(caller, " No arguments required.\n");
+ sprint(caller, "\nUsage:^3 cmd spectate <client>\n");
+ sprint(caller, " Where 'client' can be the player to spectate.\n");
return;
}
}