From 5ce7c627e0732da487a6f8bbaf8024a8b4b7fcb4 Mon Sep 17 00:00:00 2001 From: BotoX Date: Mon, 1 May 2017 12:22:12 +0200 Subject: [PATCH] ForceInput: add hammerid targeting #hammerid --- ForceInputs/scripting/ForceInputs.sp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ForceInputs/scripting/ForceInputs.sp b/ForceInputs/scripting/ForceInputs.sp index 8d6269f0..b89cdb15 100644 --- a/ForceInputs/scripting/ForceInputs.sp +++ b/ForceInputs/scripting/ForceInputs.sp @@ -135,6 +135,23 @@ public Action Command_ForceInput(int client, int args) } CloseHandle(hTrace); } + else if(sArguments[0][0] == '#') // HammerID + { + int HammerID = StringToInt(sArguments[0][1]); + + int entity = INVALID_ENT_REFERENCE; + while((entity = FindEntityByClassname(entity, "*")) != INVALID_ENT_REFERENCE) + { + if(GetEntProp(entity, Prop_Data, "m_iHammerID") == HammerID) + { + if(sArguments[2][0]) + SetVariantString(sArguments[2]); + + AcceptEntityInput(entity, sArguments[1], client, client); + ReplyToCommand(client, "[SM] Input successful."); + } + } + } else { int Wildcard = FindCharInString(sArguments[0], '*');