View Single Post
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-17-2020 , 20:26   Re: [ANY] Dev Cmds (1.8) [02-Mar-2020]
Reply With Quote #25

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 clientint args)
{
    
int target GetClientAimTarget(clientfalse);
    
    if ( 
target )
    {
        
target client;
    }
    
    if ( !
HasEntProp(targetProp_Send"m_nSequence") )
    {
        
PrintToChat(client"%i entity doesn't have m_nSequence property!"target);
        return 
Plugin_Handled;
    }
    
    if ( 
args )
    {
        
char sTemp[16];
        
GetCmdArg(1sTempsizeof sTemp);
        
int iSeq StringToInt(sTemp);
        
SetEntProp(targetProp_Send"m_nSequence"iSeq);
        return 
Plugin_Handled;
    }
    
    
CreateTimer(0.5tmrAnimEntIndexToEntRef(target), TIMER_REPEAT);
    return 
Plugin_Handled;
}

public 
Action tmrAnim(Handle timerany targetRef)
{
    static 
int animCount;
    
animCount++;
    
int target EntRefToEntIndex(targetRef);
    if( 
animCount <= && (target != INVALID_ENT_REFERENCE) )
    {
        
int seq GetEntProp(targetProp_Send"m_nSequence");
        
PrintToChatAll("[SM] %i Anim: %d"targetseq);
        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.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline