ForceInput: add hammerid targeting #hammerid
This commit is contained in:
parent
c18bfd71fb
commit
5ce7c627e0
@ -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], '*');
|
||||
|
Loading…
Reference in New Issue
Block a user