forked from UNLOZE/sm-plugins
small changes
This commit is contained in:
@@ -16,9 +16,10 @@ enum
|
||||
{
|
||||
LIMITED_NONE = 0,
|
||||
LIMITED_GENERAL = 1,
|
||||
LIMITED_PLUGIN = 2,
|
||||
|
||||
// Temp
|
||||
LIMITED_ZOMBIE = 2
|
||||
LIMITED_ZOMBIE = 4
|
||||
}
|
||||
|
||||
bool g_bEnabled = false;
|
||||
@@ -26,7 +27,7 @@ bool g_bZombieEnabled = false;
|
||||
bool g_bInOnPlayerRunCmd = false;
|
||||
|
||||
int g_ClientLimited[MAXPLAYERS + 1] = {LIMITED_NONE, ...};
|
||||
int g_ActiveLimitedFlags = LIMITED_GENERAL;
|
||||
int g_ActiveLimitedFlags = LIMITED_GENERAL|LIMITED_PLUGIN;
|
||||
|
||||
StringMap g_ClientLimitedCache;
|
||||
|
||||
@@ -343,7 +344,9 @@ public Action Command_Status(int client, int argc)
|
||||
if((target = FindTarget(client, sArgument, true, false)) == -1)
|
||||
return Plugin_Handled;
|
||||
|
||||
if(IsBhopLimited(target))
|
||||
bool bLimited = view_as<bool>(g_ClientLimited[client] & LIMITED_GENERAL);
|
||||
|
||||
if(bLimited)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] %N their bhop is currently: limited", target);
|
||||
return Plugin_Handled;
|
||||
@@ -356,7 +359,9 @@ public Action Command_Status(int client, int argc)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(IsBhopLimited(client))
|
||||
bool bLimited = view_as<bool>(g_ClientLimited[client] & LIMITED_GENERAL);
|
||||
|
||||
if(bLimited)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] your bhop is currently: limited");
|
||||
return Plugin_Handled;
|
||||
@@ -387,9 +392,9 @@ public int Native_LimitBhop(Handle plugin, int numParams)
|
||||
}
|
||||
|
||||
if(bLimited)
|
||||
AddLimitedFlag(client, LIMITED_GENERAL);
|
||||
AddLimitedFlag(client, LIMITED_PLUGIN);
|
||||
else
|
||||
RemoveLimitedFlag(client, LIMITED_GENERAL);
|
||||
RemoveLimitedFlag(client, LIMITED_PLUGIN);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -410,7 +415,7 @@ public int Native_IsBhopLimited(Handle plugin, int numParams)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int LimitedFlag = g_ClientLimited[client] & ~(LIMITED_ZOMBIE);
|
||||
int LimitedFlag = g_ClientLimited[client] & LIMITED_PLUGIN;
|
||||
|
||||
return LimitedFlag != LIMITED_NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user