Add GetCmdArgFloat(Ex) stocks (#1742)

This commit is contained in:
Arron Vinyard
2022-04-12 11:17:05 +01:00
committed by GitHub
parent 01203a5a44
commit 852703ccca
3 changed files with 44 additions and 13 deletions
+1 -3
View File
@@ -383,9 +383,7 @@ public Action Command_Burn(int client, int args)
if (args > 1)
{
char time[20];
GetCmdArg(2, time, sizeof(time));
if (StringToFloatEx(time, seconds) == 0)
if (!GetCmdArgFloatEx(2, seconds))
{
ReplyToCommand(client, "[SM] %t", "Invalid Amount");
return Plugin_Handled;
+1 -3
View File
@@ -197,9 +197,7 @@ public Action Command_Gravity(int client, int args)
float amount = 1.0;
if (args > 1)
{
char arg2[20];
GetCmdArg(2, arg2, sizeof(arg2));
if (StringToFloatEx(arg2, amount) == 0)
if (!GetCmdArgFloatEx(2, amount))
{
ReplyToCommand(client, "[SM] %t", "Invalid Amount");
return Plugin_Handled;