Log in to reply
 

Animation flags don't work?



  • I want to play an animation with scripthookv (c++). But none of the controllable flags work, for example:

    TASK_PLAY_ANIM(PLAYER_PED_ID(), animDict, animName, 8f, -4f, -1, 32, 0f, false, false, false );
    

    but to no avail. It just freezes the player in place and they can't move.
    I see scripts for FveM that use the same native, except they work? Is there something I am doing wrong?



  • @Modder_101 flags work fine but showing a native rather than your actual code doesn't help. With Google you can find many examples, c ++ and more recently c#.



  • here is my code:

    static std::string animDict = "nm@hands";
    static std::string animName = "hands";
    
    static void PlayAnim()
    {
         REQUEST_ANIM_DICT(animDict.c_str());
         while (!HAS_ANIM_DICT_LOADED(animDict.c_str()))
         {
              WAIT(0);
         }
         CLEAR_PED_TASKS_IMMEDIATELY(PLAYER_PED_ID());
         TASK_PLAY_ANIM(PLAYER_PED_ID(), animDict.c_str(), animName.c_str(), 8.f, -4.f, -1, 32, 0.f, false, false, false);
    }
    
    static void Main()
    {
         PlayAnim();
    }
    


  • @Modder_101 said in Animation flags don't work?:

    here is my code:

    static std::string animDict = "nm@hands";
    static std::string animName = "hands";
    
    static void PlayAnim()
    {
         REQUEST_ANIM_DICT(animDict.c_str());
         while (!HAS_ANIM_DICT_LOADED(animDict.c_str()))
         {
              WAIT(0);
         }
         CLEAR_PED_TASKS_IMMEDIATELY(PLAYER_PED_ID());
         TASK_PLAY_ANIM(PLAYER_PED_ID(), animDict.c_str(), animName.c_str(), 8.f, -4.f, -1, 32, 0.f, false, false, false);
    }
    
    static void Main()
    {
         PlayAnim();
    }
    

    The player still can't move. @JohnFromGWN


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.