Skip to content

Commit

Permalink
Force Slay is disabled by default now
Browse files Browse the repository at this point in the history
  • Loading branch information
Bara committed Oct 20, 2018
1 parent 6b4db9a commit 6dd9129
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions addons/sourcemod/scripting/ttt/ttt.sp
Expand Up @@ -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> <rounds> <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<bool>(StringToInt(arg3));
}

char target_name[MAX_TARGET_LENGTH];
int target_list[MAXPLAYERS];
Expand Down Expand Up @@ -2237,7 +2244,7 @@ public Action Command_RSlays(int client, int args)
return Plugin_Handled;
}

TTT_SetRoundSlays(target, rounds, view_as<bool>(StringToInt(arg3)));
TTT_SetRoundSlays(target, rounds, bForce);

LoopValidClients(j)
{
Expand Down

0 comments on commit 6dd9129

Please sign in to comment.