ExtraCommands: Add HammerID to sm_info

This commit is contained in:
BotoX 2017-03-02 21:22:51 +01:00
parent 7b80848cd0
commit 1b352b587f

View File

@ -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.");