From 6dd91299a7d7fceb0582677b836fb6de25b76f22 Mon Sep 17 00:00:00 2001 From: Bara Date: Sat, 20 Oct 2018 17:08:30 +0200 Subject: [PATCH] Force Slay is disabled by default now --- addons/sourcemod/scripting/ttt/ttt.sp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/sourcemod/scripting/ttt/ttt.sp b/addons/sourcemod/scripting/ttt/ttt.sp index cd13ad97..e553bd63 100644 --- a/addons/sourcemod/scripting/ttt/ttt.sp +++ b/addons/sourcemod/scripting/ttt/ttt.sp @@ -2195,18 +2195,25 @@ public Action Command_RSlays(int client, int args) return Plugin_Handled; } - if (args != 3) + if (args < 2 || args > 3) { ReplyToCommand(client, "[SM] Usage: sm_rslays <#userid|name> <0 - Slay Next Round, 1 - Instant Slay>"); return Plugin_Handled; } + bool bForce = false; + char arg1[32]; char arg2[12]; char arg3[12]; GetCmdArg(1, arg1, sizeof(arg1)); GetCmdArg(2, arg2, sizeof(arg2)); - GetCmdArg(3, arg3, sizeof(arg3)); + + if (args == 3) + { + GetCmdArg(3, arg3, sizeof(arg3)); + bForce = view_as(StringToInt(arg3)); + } char target_name[MAX_TARGET_LENGTH]; int target_list[MAXPLAYERS]; @@ -2237,7 +2244,7 @@ public Action Command_RSlays(int client, int args) return Plugin_Handled; } - TTT_SetRoundSlays(target, rounds, view_as(StringToInt(arg3))); + TTT_SetRoundSlays(target, rounds, bForce); LoopValidClients(j) {