summaryrefslogtreecommitdiff
path: root/sourcemod/scripting/gokz-jumpstats/commands.sp
blob: 991f9e66320223a19ac5a16f548e956a08f701fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

void RegisterCommands()
{
	RegConsoleCmd("sm_jso", CommandJumpstatsOptions, "[KZ] Open the jumpstats options menu.");
	RegConsoleCmd("sm_jsalways", CommandAlwaysJumpstats, "[KZ] Toggle the always-on jumpstats.");
}

public Action CommandJumpstatsOptions(int client, int args)
{
	DisplayJumpstatsOptionsMenu(client);
	return Plugin_Handled;
} 

public Action CommandAlwaysJumpstats(int client, int args)
{
	if (GOKZ_JS_GetOption(client, JSOption_JumpstatsAlways) == JSToggleOption_Enabled)
	{
		GOKZ_JS_SetOption(client, JSOption_JumpstatsAlways, JSToggleOption_Disabled);
		GOKZ_PrintToChat(client, true, "%t", "Jumpstats Option - Jumpstats Always - Disable");
	}
	else
	{
		GOKZ_JS_SetOption(client, JSOption_JumpstatsAlways, JSToggleOption_Enabled);
		GOKZ_PrintToChat(client, true, "%t", "Jumpstats Option - Jumpstats Always - Enable");
	}
	
	return Plugin_Handled;
}