summaryrefslogtreecommitdiff
path: root/sourcemod/scripting/gokz-racing/commands.sp
diff options
context:
space:
mode:
authornavewindre <nw@moneybot.cc>2023-12-04 18:06:10 +0100
committernavewindre <nw@moneybot.cc>2023-12-04 18:06:10 +0100
commitaef0d1c1268ab7d4bc18996c9c6b4da16a40aadc (patch)
tree43e766b51704f4ab8b383583bdc1871eeeb9c698 /sourcemod/scripting/gokz-racing/commands.sp
parent38f1140c11724da05a23a10385061200b907cf6e (diff)
bbbbbbbbwaaaaaaaaaaa
Diffstat (limited to 'sourcemod/scripting/gokz-racing/commands.sp')
-rw-r--r--sourcemod/scripting/gokz-racing/commands.sp47
1 files changed, 47 insertions, 0 deletions
diff --git a/sourcemod/scripting/gokz-racing/commands.sp b/sourcemod/scripting/gokz-racing/commands.sp
new file mode 100644
index 0000000..9fbd7ab
--- /dev/null
+++ b/sourcemod/scripting/gokz-racing/commands.sp
@@ -0,0 +1,47 @@
+void RegisterCommands()
+{
+ RegConsoleCmd("sm_accept", CommandAccept, "[KZ] Accept an incoming race request.");
+ RegConsoleCmd("sm_decline", CommandDecline, "[KZ] Decline an incoming race request.");
+ RegConsoleCmd("sm_surrender", CommandSurrender, "[KZ] Surrender your race.");
+ RegConsoleCmd("sm_duel", CommandDuel, "[KZ] Open the duel menu.");
+ RegConsoleCmd("sm_challenge", CommandDuel, "[KZ] Open the duel menu.");
+ RegConsoleCmd("sm_abort", CommandAbort, "[KZ] Abort the race you are hosting.");
+
+ RegAdminCmd("sm_race", CommandRace, ADMFLAG_RESERVATION, "[KZ] Open the race hosting menu.");
+}
+
+public Action CommandAccept(int client, int args)
+{
+ AcceptRequest(client);
+ return Plugin_Handled;
+}
+
+public Action CommandDecline(int client, int args)
+{
+ DeclineRequest(client);
+ return Plugin_Handled;
+}
+
+public Action CommandSurrender(int client, int args)
+{
+ SurrenderRacer(client);
+ return Plugin_Handled;
+}
+
+public Action CommandDuel(int client, int args)
+{
+ DisplayDuelMenu(client);
+ return Plugin_Handled;
+}
+
+public Action CommandAbort(int client, int args)
+{
+ AbortHostedRace(client);
+ return Plugin_Handled;
+}
+
+public Action CommandRace(int client, int args)
+{
+ DisplayRaceMenu(client);
+ return Plugin_Handled;
+} \ No newline at end of file