Yea I tried that method to see if it was near the players hand/face etc, but nothing returned 😕
It seems like the object doesn't actually exist during the animation - Almost as if it is hidden.
I found the animations but of course there were no objects (Ironically none of the animations I found actually load during the drinking animation?)
I did find a reliable animation dictionary however - face_human@gen_male@scenario@drinkbottle
This animation dictionary gets loaded whenever the player drinks from a bottle.
The downside is - It doesn't ever seem to unload (So nothing as simple as "Oh well i'll just run a check for TASK 471 then check if the animation dictionary loaded"
So now i'm looking if the player is actually using the animation -
I have no idea what the taskflag is supposed to be for ENTITY::IS_ENTITY_PLAYING_ANIM
I've tried the GTAV 3 flag or 2, but I fear this is not the case.
I also found something about getting off a horse animation that used 1 << 18 (262144)
I think I might just have to spawn a bunch of bottles and have a loop going to see if the animation hits
Here is my current debug code for those that care
const char* scenarios[] = {
"loop_short",
"loop_long",
"opengulp",
"enter",
"strain_enter",
"closegulp",
"strain_gasp",
"strain_loop_long",
"strain_exit",
"enter_short",
"strain_loop_short",
"exit"
};
for (const char* scenario : scenarios)
{
if (ENTITY::IS_ENTITY_PLAYING_ANIM(PLAYER::PLAYER_PED_ID(), "face_human@gen_male@scenario@drinkbottle", scenario, 1 << 18))
{
PrintSubtitle("Works");
break;
}
}