From 1b352b587f237f060147a2f9d1d06cdf601267a4 Mon Sep 17 00:00:00 2001 From: BotoX Date: Thu, 2 Mar 2017 21:22:51 +0100 Subject: [PATCH] ExtraCommands: Add HammerID to sm_info --- ExtraCommands/scripting/ExtraCommands.sp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ExtraCommands/scripting/ExtraCommands.sp b/ExtraCommands/scripting/ExtraCommands.sp index a84c895..6e30f88 100644 --- a/ExtraCommands/scripting/ExtraCommands.sp +++ b/ExtraCommands/scripting/ExtraCommands.sp @@ -21,14 +21,14 @@ static char g_sServerCanExecuteCmds[][] = { "cl_soundscape_flush", "r_screenover "slot0", "slot1", "slot2", "slot3", "slot4", "slot5", "slot6", "slot7", "slot8", "slot9", "slot10", "cl_spec_mode", "cancelselect", "invnext", "play", "invprev", "sndplaydelay", "lastinv", "dsp_player", - "name", "redirect", "retry", "r_cleardecals", "echo", "soundfade" }; + "name", "redirect", "retry", "r_cleardecals", "echo", "soundfade"}; public Plugin myinfo = { name = "Advanced Commands", author = "BotoX + Obus", description = "Adds extra commands for admins.", - version = "2.1.3", + version = "2.1.4", url = "https://github.com/CSSZombieEscape/sm-plugins/tree/master/ExtraCommands/" }; @@ -1010,6 +1010,7 @@ public Action Command_WAILA(int client, int argc) char sTargetname[64]; int iEntity; int iEntityModelIdx; + int iHammerID; TR_GetEndPosition(vecEndPos, hTraceRay); @@ -1027,8 +1028,9 @@ public Action Command_WAILA(int client, int argc) GetEntityNetClass(iEntity, sNetClsName, sizeof(sNetClsName)); GetEntPropString(iEntity, Prop_Data, "m_iName", sTargetname, sizeof(sTargetname)); iEntityModelIdx = GetEntProp(iEntity, Prop_Send, "m_nModelIndex"); + iHammerID = GetEntProp(iEntity, Prop_Data, "m_iHammerID"); - PrintToConsole(client, "Entity Index: %i\nTarget name: %s\nModel Path: %s\nModel Index: %i\nClass Name: %s\nNet Class Name: %s", iEntity, sTargetname, sModelPath, iEntityModelIdx, sClsName, sNetClsName); + 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); PrintToChat(client, "[SM] Trace hit something, check your console for more information.");