From dedcaed604fdc063095e825f17a2ac07aa0ded9b Mon Sep 17 00:00:00 2001 From: BotoX Date: Sat, 21 Sep 2019 19:59:37 +0200 Subject: [PATCH] small changes --- ExtraCommands/scripting/ExtraCommands.sp | 5 ++++- SelectiveBhop/scripting/SelectiveBhop.sp | 19 ++++++++++++------- TeamManager/scripting/TeamManager.sp | 1 + 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ExtraCommands/scripting/ExtraCommands.sp b/ExtraCommands/scripting/ExtraCommands.sp index b553d95a..9bddb8ee 100644 --- a/ExtraCommands/scripting/ExtraCommands.sp +++ b/ExtraCommands/scripting/ExtraCommands.sp @@ -1150,6 +1150,7 @@ stock void WAILA(int client, int iEntity) char sClsName[64]; char sNetClsName[64]; char sTargetname[64]; + float fvecOrigin[3]; int iEntityModelIdx = -1; int iHammerID = -1; @@ -1157,12 +1158,14 @@ stock void WAILA(int client, int iEntity) GetEntityClassname(iEntity, sClsName, sizeof(sClsName)); GetEntityNetClass(iEntity, sNetClsName, sizeof(sNetClsName)); GetEntPropString(iEntity, Prop_Data, "m_iName", sTargetname, sizeof(sTargetname)); + GetEntPropVector(iEntity, Prop_Send, "m_vecOrigin", fvecOrigin); if(HasEntProp(iEntity, Prop_Send, "m_nModelIndex")) iEntityModelIdx = GetEntProp(iEntity, Prop_Send, "m_nModelIndex"); if(HasEntProp(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]; for(int index = 0; ; index++) diff --git a/SelectiveBhop/scripting/SelectiveBhop.sp b/SelectiveBhop/scripting/SelectiveBhop.sp index 15e96578..d668beb3 100644 --- a/SelectiveBhop/scripting/SelectiveBhop.sp +++ b/SelectiveBhop/scripting/SelectiveBhop.sp @@ -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(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(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; } diff --git a/TeamManager/scripting/TeamManager.sp b/TeamManager/scripting/TeamManager.sp index 5ec9873a..63d6b327 100644 --- a/TeamManager/scripting/TeamManager.sp +++ b/TeamManager/scripting/TeamManager.sp @@ -186,6 +186,7 @@ public Action OnJoinTeamCommand(int client, const char[] command, int argc) if(g_bZombieSpawned && NewTeam == CurrentTeam) return Plugin_Handled; + ForcePlayerSuicide(client); ChangeClientTeam(client, CS_TEAM_NONE); ChangeClientTeam(client, NewTeam); return Plugin_Handled;