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_Generic("help");
16 if(GameCommand_Generic(command))
19 if(argv(0) == "teamstatus")
21 PrintScoreboard(world);
25 if(argv(0) == "printstats")
31 if(argv(0) == "warp") if(argc == 2) if(cvar("g_campaign"))
33 CampaignLevelWarp(stof(argv(1)));
37 if(argv(0) == "adminmsg") if(argc == 3)
41 entno = stof(argv(1));
42 for(client = world; entno > 0; --entno, client = nextent(client))
44 if(client.flags & FL_CLIENT)
46 centerprint_atprio(client, CENTERPRIO_ADMIN, strcat("^3SERVER ADMIN:\n\n^7", argv(2)));
47 sprint(client, strcat("\{1}\{13}^3SERVER ADMIN^7: ", argv(2), "\n"));
48 print("Message sent to ", client.netname, "\n");
51 print("Client not found\n");
55 print("Invalid command. For a list of supported commands, try sv_cmd help.\n");