small changes
This commit is contained in:
parent
27631bb256
commit
d58431daf2
@ -1150,6 +1150,7 @@ stock void WAILA(int client, int iEntity)
|
|||||||
char sClsName[64];
|
char sClsName[64];
|
||||||
char sNetClsName[64];
|
char sNetClsName[64];
|
||||||
char sTargetname[64];
|
char sTargetname[64];
|
||||||
|
float fvecOrigin[3];
|
||||||
int iEntityModelIdx = -1;
|
int iEntityModelIdx = -1;
|
||||||
int iHammerID = -1;
|
int iHammerID = -1;
|
||||||
|
|
||||||
@ -1157,12 +1158,14 @@ stock void WAILA(int client, int iEntity)
|
|||||||
GetEntityClassname(iEntity, sClsName, sizeof(sClsName));
|
GetEntityClassname(iEntity, sClsName, sizeof(sClsName));
|
||||||
GetEntityNetClass(iEntity, sNetClsName, sizeof(sNetClsName));
|
GetEntityNetClass(iEntity, sNetClsName, sizeof(sNetClsName));
|
||||||
GetEntPropString(iEntity, Prop_Data, "m_iName", sTargetname, sizeof(sTargetname));
|
GetEntPropString(iEntity, Prop_Data, "m_iName", sTargetname, sizeof(sTargetname));
|
||||||
|
GetEntPropVector(iEntity, Prop_Send, "m_vecOrigin", fvecOrigin);
|
||||||
if(HasEntProp(iEntity, Prop_Send, "m_nModelIndex"))
|
if(HasEntProp(iEntity, Prop_Send, "m_nModelIndex"))
|
||||||
iEntityModelIdx = GetEntProp(iEntity, Prop_Send, "m_nModelIndex");
|
iEntityModelIdx = GetEntProp(iEntity, Prop_Send, "m_nModelIndex");
|
||||||
if(HasEntProp(iEntity, Prop_Data, "m_iHammerID"))
|
if(HasEntProp(iEntity, Prop_Data, "m_iHammerID"))
|
||||||
iHammerID = GetEntProp(iEntity, Prop_Data, "m_iHammerID");
|
iHammerID = GetEntProp(iEntity, Prop_Data, "m_iHammerID");
|
||||||
|
|
||||||
PrintToConsole(client, "Entity Index: %i\nHammer ID: %d\nTarget name: %s\nModel Path: %s\nModel Index: %i\nClass Name: %s\nNet Class Name: %s", iEntity, iHammerID, sTargetname, sModelPath, iEntityModelIdx, sClsName, sNetClsName);
|
PrintToConsole(client, "Entity Index: %i\nOrigin: %.f %.f %.f\nHammer ID: %d\nTarget name: %s\nModel Path: %s\nModel Index: %i\nClass Name: %s\nNet Class Name: %s",
|
||||||
|
iEntity, fvecOrigin[0], fvecOrigin[1], fvecOrigin[2], iHammerID, sTargetname, sModelPath, iEntityModelIdx, sClsName, sNetClsName);
|
||||||
|
|
||||||
char sOutputName[128];
|
char sOutputName[128];
|
||||||
for(int index = 0; ; index++)
|
for(int index = 0; ; index++)
|
||||||
|
@ -16,9 +16,10 @@ enum
|
|||||||
{
|
{
|
||||||
LIMITED_NONE = 0,
|
LIMITED_NONE = 0,
|
||||||
LIMITED_GENERAL = 1,
|
LIMITED_GENERAL = 1,
|
||||||
|
LIMITED_PLUGIN = 2,
|
||||||
|
|
||||||
// Temp
|
// Temp
|
||||||
LIMITED_ZOMBIE = 2
|
LIMITED_ZOMBIE = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
bool g_bEnabled = false;
|
bool g_bEnabled = false;
|
||||||
@ -26,7 +27,7 @@ bool g_bZombieEnabled = false;
|
|||||||
bool g_bInOnPlayerRunCmd = false;
|
bool g_bInOnPlayerRunCmd = false;
|
||||||
|
|
||||||
int g_ClientLimited[MAXPLAYERS + 1] = {LIMITED_NONE, ...};
|
int g_ClientLimited[MAXPLAYERS + 1] = {LIMITED_NONE, ...};
|
||||||
int g_ActiveLimitedFlags = LIMITED_GENERAL;
|
int g_ActiveLimitedFlags = LIMITED_GENERAL|LIMITED_PLUGIN;
|
||||||
|
|
||||||
StringMap g_ClientLimitedCache;
|
StringMap g_ClientLimitedCache;
|
||||||
|
|
||||||
@ -343,7 +344,9 @@ public Action Command_Status(int client, int argc)
|
|||||||
if((target = FindTarget(client, sArgument, true, false)) == -1)
|
if((target = FindTarget(client, sArgument, true, false)) == -1)
|
||||||
return Plugin_Handled;
|
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);
|
ReplyToCommand(client, "[SM] %N their bhop is currently: limited", target);
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
@ -356,7 +359,9 @@ public Action Command_Status(int client, int argc)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(IsBhopLimited(client))
|
bool bLimited = view_as<bool>(g_ClientLimited[client] & LIMITED_GENERAL);
|
||||||
|
|
||||||
|
if(bLimited)
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "[SM] your bhop is currently: limited");
|
ReplyToCommand(client, "[SM] your bhop is currently: limited");
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
@ -387,9 +392,9 @@ public int Native_LimitBhop(Handle plugin, int numParams)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(bLimited)
|
if(bLimited)
|
||||||
AddLimitedFlag(client, LIMITED_GENERAL);
|
AddLimitedFlag(client, LIMITED_PLUGIN);
|
||||||
else
|
else
|
||||||
RemoveLimitedFlag(client, LIMITED_GENERAL);
|
RemoveLimitedFlag(client, LIMITED_PLUGIN);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -410,7 +415,7 @@ public int Native_IsBhopLimited(Handle plugin, int numParams)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LimitedFlag = g_ClientLimited[client] & ~(LIMITED_ZOMBIE);
|
int LimitedFlag = g_ClientLimited[client] & LIMITED_PLUGIN;
|
||||||
|
|
||||||
return LimitedFlag != LIMITED_NONE;
|
return LimitedFlag != LIMITED_NONE;
|
||||||
}
|
}
|
||||||
|
@ -186,6 +186,7 @@ public Action OnJoinTeamCommand(int client, const char[] command, int argc)
|
|||||||
if(g_bZombieSpawned && NewTeam == CurrentTeam)
|
if(g_bZombieSpawned && NewTeam == CurrentTeam)
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
|
|
||||||
|
ForcePlayerSuicide(client);
|
||||||
ChangeClientTeam(client, CS_TEAM_NONE);
|
ChangeClientTeam(client, CS_TEAM_NONE);
|
||||||
ChangeClientTeam(client, NewTeam);
|
ChangeClientTeam(client, NewTeam);
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
|
Loading…
Reference in New Issue
Block a user