AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How do I set player's animations with orpheu? (https://forums.alliedmods.net/showthread.php?t=164184)

bogdyuttzu 08-08-2011 09:44

How do I set player's animations with orpheu?
 
I have this sing

PHP Code:

{
    
"name"      "SetAnimation",
    
"class"     "CBasePlayer",
    
"library"   "mod",
    
"arguments" :
    [
        {
            
"type"  "PLAYER_ANIM"
        
}
    ],
    
"identifiers":
    [
        {
            
"os"    "windows",
            
"mod"   "cstrike",
            
"value" : [0x83,0xEC,0x48,0x53,0x55,0x8B,0xE9,0x56,0x57,0x8B,0x4D,0x04,0x8B,0x81,"*","*","*","*",0x85,0xC0,0x0F,0x84,"*","*","*","*",0x8B]
        },
        {
            
"os"    "linux",
            
"mod"   "cstrike",
            
"value" "SetAnimation__11CBasePlayer11PLAYER_ANIM"
        
}
    ]


PHP Code:

public anim(id)
{
    
OrpheuCall(OrpheuGetFunction("SetAnimation""CBasePlayer"), "8")


I want to set player animations and i use this, but i don't have id

Arkshine 08-08-2011 09:50

Re: How do I set player's animations with orpheu?
 
Code:

//
// Player animation.
//
enum PLAYER_ANIM
{
        PLAYER_IDLE,
        PLAYER_WALK,
        PLAYER_JUMP,
        PLAYER_SUPERJUMP,
        PLAYER_DIE,
        PLAYER_ATTACK1,
        PLAYER_ATTACK1_RIGHT,
        PLAYER_SMALL_FLINCH,
        PLAYER_LARGE_FLINCH,
        PLAYER_RELOAD,
        PLAYER_HOLDBOMB
};



Don't forget to pass the player's id too.

But what you are doing won't work, because SetAnimation is called all the time. So you better hook it and supercede the current animation.


All times are GMT -4. The time now is 03:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.