1 void GameCommand(string command)
4 argc = tokenize(command);
6 if(argv(0) == "help" || argc == 0)
8 print("Usage: sv_cmd COMMAND..., where possible commands are:\n");
9 print(" adminmsg clientnumber \"message\"\n");
10 print(" teamstatus\n");
11 print(" printstats\n");
12 GameCommand_Ban("help");
13 GameCommand_Generic("help");
17 if(GameCommand_Ban(command))
20 if(GameCommand_Generic(command))
23 if(argv(0) == "teamstatus")
25 PrintScoreboard(world);
29 if(argv(0) == "printstats")
35 if(argv(0) == "warp") if(argc == 2) if(cvar("g_campaign"))
37 CampaignLevelWarp(stof(argv(1)));
41 if(argv(0) == "adminmsg") if(argc == 3)
45 entno = stof(argv(1));
46 for(client = world; entno > 0; --entno, client = nextent(client))
48 if(client.flags & FL_CLIENT)
50 centerprint_atprio(client, CENTERPRIO_ADMIN, strcat("^3SERVER ADMIN:\n\n^7", argv(2)));
51 sprint(client, strcat("\{1}\{13}^3SERVER ADMIN^7: ", argv(2), "\n"));
52 print("Message sent to ", client.netname, "\n");
55 print("Client not found\n");
59 print("Invalid command. For a list of supported commands, try sv_cmd help.\n");