1 string GotoMap(string m);
3 void make_mapinfo_Think()
5 MapInfo_Enumerate(); // just in case
6 if(MapInfo_FilterGametype(MAPINFO_TYPE_ALL))
8 print("Done rebuiling mapinfos.\n");
13 self.think = make_mapinfo_Think;
14 self.nextthink = time;
18 void GameCommand(string command)
21 argc = tokenize(command);
23 if(argv(0) == "help" || argc == 0)
25 print("Usage: sv_cmd COMMAND..., where possible commands are:\n");
26 print(" adminmsg clientnumber \"message\"\n");
27 print(" teamstatus\n");
28 print(" printstats\n");
29 print(" make_mapinfo\n");
30 GameCommand_Ban("help");
31 GameCommand_Generic("help");
35 if(GameCommand_Ban(command))
38 if(GameCommand_Generic(command))
41 if(argv(0) == "teamstatus")
43 PrintScoreboard(world);
47 if(argv(0) == "printstats")
53 if(argv(0) == "make_mapinfo")
57 e.classname = "make_mapinfo";
58 e.think = make_mapinfo_Think;
63 if(argv(0) == "warp") if(argc == 2) if(cvar("g_campaign"))
65 CampaignLevelWarp(stof(argv(1)));
69 if(argv(0) == "gotomap") if(argc == 2)
71 print(GotoMap(argv(1)), "\n");
75 if(argv(0) == "adminmsg") if(argc == 3)
79 entno = stof(argv(1));
80 for(client = world; entno > 0; --entno, client = nextent(client))
82 if(client.flags & FL_CLIENT)
84 centerprint_atprio(client, CENTERPRIO_ADMIN, strcat("^3SERVER ADMIN:\n\n^7", argv(2)));
85 sprint(client, strcat("\{1}\{13}^3SERVER ADMIN^7: ", argv(2), "\n"));
86 print("Message sent to ", client.netname, "\n");
89 print("Client not found\n");
93 print("Invalid command. For a list of supported commands, try sv_cmd help.\n");