Also, suggest to update sm_anim with
PHP Code:
RegAdminCmd("sm_anim", CmdAnim, ADMFLAG_ROOT, "<sequence> (optional). Show aimed entities animation sequence number (for 6 * 0.5 seconds) or your own if not aimed. Optionally, it can set sequence.");
...
public Action CmdAnim(int client, int args)
{
int target = GetClientAimTarget(client, false);
if ( target < 0 )
{
target = client;
}
if ( !HasEntProp(target, Prop_Send, "m_nSequence") )
{
PrintToChat(client, "%i entity doesn't have m_nSequence property!", target);
return Plugin_Handled;
}
if ( args > 0 )
{
char sTemp[16];
GetCmdArg(1, sTemp, sizeof sTemp);
int iSeq = StringToInt(sTemp);
SetEntProp(target, Prop_Send, "m_nSequence", iSeq);
return Plugin_Handled;
}
CreateTimer(0.5, tmrAnim, EntIndexToEntRef(target), TIMER_REPEAT);
return Plugin_Handled;
}
public Action tmrAnim(Handle timer, any targetRef)
{
static int animCount;
animCount++;
int target = EntRefToEntIndex(targetRef);
if( animCount <= 6 && (target != INVALID_ENT_REFERENCE) )
{
int seq = GetEntProp(target, Prop_Send, "m_nSequence");
PrintToChatAll("[SM] %i Anim: %d", target, seq);
return Plugin_Continue;
}
animCount = 0;
return Plugin_Stop;
}
allowing to see other (aimed) entities' anim. seq, not only client itself.
And optionally set the sequence.
__________________