diff options
| author | navewindre <nw@moneybot.cc> | 2023-12-04 18:06:10 +0100 |
|---|---|---|
| committer | navewindre <nw@moneybot.cc> | 2023-12-04 18:06:10 +0100 |
| commit | aef0d1c1268ab7d4bc18996c9c6b4da16a40aadc (patch) | |
| tree | 43e766b51704f4ab8b383583bdc1871eeeb9c698 /sourcemod/scripting/gokz-jumpstats/commands.sp | |
| parent | 38f1140c11724da05a23a10385061200b907cf6e (diff) | |
bbbbbbbbwaaaaaaaaaaa
Diffstat (limited to 'sourcemod/scripting/gokz-jumpstats/commands.sp')
| -rw-r--r-- | sourcemod/scripting/gokz-jumpstats/commands.sp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sourcemod/scripting/gokz-jumpstats/commands.sp b/sourcemod/scripting/gokz-jumpstats/commands.sp new file mode 100644 index 0000000..991f9e6 --- /dev/null +++ b/sourcemod/scripting/gokz-jumpstats/commands.sp @@ -0,0 +1,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; +} |
