4Map_NewGame(
int skillValue)
6 if (fileExists(
"cfg/chapter1.cfg")) {
7 localcmd(
"set sv_background 0\nset sv_playerslots 1\nset maxclients 1\nset deathmatch 0\nset coop 0\nset g_gametype singleplayer\nexec cfg/chapter1.cfg");
9 localcmd( sprintf(
"set sv_background 0\nset skill %i\nset sv_playerslots 1\nset maxclients 1\nset deathmatch 0\nset coop 0\nset g_gametype singleplayer\n%s", skillValue,
GameLibrary_GetInfo(
GAMEINFO_STARTMAP)) );
37Map_SpawnServer(
string hostName,
string mapName,
int maxPlayers,
string gameType,
string passWord)
39 localcmd( sprintf(
"set sv_background 0\nhostname %s\n", hostName ) );
40 localcmd( sprintf(
"set maxplayers %i\n", maxPlayers ) );
41 localcmd( sprintf(
"set sv_password %s\n", passWord ) );
42 localcmd( sprintf(
"set g_gametype %s\n", gameType ) );
43 localcmd( sprintf(
"map %s\n", mapName ) );
__variant GameLibrary_GetInfo(gameInfo_t)
Retrieves fields for the currently running game.
Definition gamelibrary.qc:796
@ GAMEINFO_STARTMAP
(string) The command for starting a new game.
Definition gamelibrary.h:71
@ GAMEINFO_TRAININGMAP
(string) The command for starting the training.
Definition gamelibrary.h:72
void RichPresence_Set(string strKey, string strValue)
Sets a rich-presence key to the desired value.
Definition richpresence.qc:32
void RichPresence_Clear(void)
Clears the current rich-presence status.
Definition richpresence.qc:52