Use GetCmdArgInt(Ex) in base plugins (#1203)
This commit is contained in:
@@ -237,9 +237,7 @@ public Action Command_Blind(int client, int args)
|
||||
int amount = 0;
|
||||
if (args > 1)
|
||||
{
|
||||
char arg2[20];
|
||||
GetCmdArg(2, arg2, sizeof(arg2));
|
||||
if (StringToIntEx(arg2, amount) == 0)
|
||||
if (!GetCmdArgIntEx(2, amount))
|
||||
{
|
||||
ReplyToCommand(client, "[SM] %t", "Invalid Amount");
|
||||
return Plugin_Handled;
|
||||
|
||||
@@ -492,15 +492,10 @@ public Action Command_Freeze(int client, int args)
|
||||
|
||||
int seconds = g_Cvar_FreezeDuration.IntValue;
|
||||
|
||||
if (args > 1)
|
||||
if (args > 1 && !GetCmdArgIntEx(2, seconds))
|
||||
{
|
||||
char time[20];
|
||||
GetCmdArg(2, time, sizeof(time));
|
||||
if (StringToIntEx(time, seconds) == 0)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] %t", "Invalid Amount");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
ReplyToCommand(client, "[SM] %t", "Invalid Amount");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
char target_name[MAX_TARGET_LENGTH];
|
||||
|
||||
Reference in New Issue
Block a user