Fixed errors in SprayManager
FindTarget should just return 0 when it doesn't find someone tbh smh fam
This commit is contained in:
parent
f632418de8
commit
9c0f171488
@ -5,7 +5,9 @@
|
|||||||
#include <cstrike>
|
#include <cstrike>
|
||||||
|
|
||||||
#undef REQUIRE_PLUGIN
|
#undef REQUIRE_PLUGIN
|
||||||
|
|
||||||
#include <adminmenu>
|
#include <adminmenu>
|
||||||
|
|
||||||
#define REQUIRE_PLUGIN
|
#define REQUIRE_PLUGIN
|
||||||
|
|
||||||
#pragma newdecls required
|
#pragma newdecls required
|
||||||
@ -1322,7 +1324,7 @@ public Action Command_SprayBan(int client, int argc)
|
|||||||
GetCmdArg(3, sReason, sizeof(sReason));
|
GetCmdArg(3, sReason, sizeof(sReason));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(iTarget = FindTarget(client, sTarget)))
|
if ((iTarget = FindTarget(client, sTarget)) <= 0)
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
|
|
||||||
if (SprayBanClient(client, iTarget, StringToInt(sLength), sReason))
|
if (SprayBanClient(client, iTarget, StringToInt(sLength), sReason))
|
||||||
@ -1344,7 +1346,7 @@ public Action Command_SprayUnban(int client, int argc)
|
|||||||
|
|
||||||
GetCmdArg(1, sTarget, sizeof(sTarget));
|
GetCmdArg(1, sTarget, sizeof(sTarget));
|
||||||
|
|
||||||
if (!(iTarget = FindTarget(client, sTarget)))
|
if ((iTarget = FindTarget(client, sTarget)) <= 0)
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
|
|
||||||
if (!SprayUnbanClient(iTarget))
|
if (!SprayUnbanClient(iTarget))
|
||||||
@ -1371,7 +1373,7 @@ public Action Command_BanSpray(int client, int argc)
|
|||||||
|
|
||||||
GetCmdArg(1, sTarget, sizeof(sTarget));
|
GetCmdArg(1, sTarget, sizeof(sTarget));
|
||||||
|
|
||||||
if (!(iTarget = FindTarget(client, sTarget)))
|
if ((iTarget = FindTarget(client, sTarget)) <= 0)
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
|
|
||||||
if (!BanClientSpray(iTarget))
|
if (!BanClientSpray(iTarget))
|
||||||
@ -1398,7 +1400,7 @@ public Action Command_UnbanSpray(int client, int argc)
|
|||||||
|
|
||||||
GetCmdArg(1, sTarget, sizeof(sTarget));
|
GetCmdArg(1, sTarget, sizeof(sTarget));
|
||||||
|
|
||||||
if (!(iTarget = FindTarget(client, sTarget)))
|
if ((iTarget = FindTarget(client, sTarget)) <= 0)
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
|
|
||||||
if (!UnbanClientSpray(iTarget))
|
if (!UnbanClientSpray(iTarget))
|
||||||
|
Loading…
Reference in New Issue
Block a user