C# Mono V2 - Help detecting end of animal skinning

Use : mono_v2_get_started/Setup.md at main · thorium-cfx/mono_v2_get_started · GitHub

Hey everyone,

I’m currently building a hunting system in RedM and I need to detect when the player finishes skinning an animal.

Here’s how I generate the deer ped:

uint deerHash = (uint)Natives.GetHashKey("A_C_Deer_01");
deerHandle = Natives.CreatePed(deerHash, spawnPos.X, spawnPos.Y, spawnPos.Z, 0.0f, true, false, false, false);

Then, in my coroutine I try to monitor if the player is playing an animation during skinning:

private async Coroutine MonitorSkinning()
{
    int playerPed = Natives.PlayerPedId();

    while (Natives.IsEntityPlayingAnyAnim(playerPed, 1))
    {
        await Wait(1000);
    }
                Debug.WriteLine("Looting done");

}

But IsEntityPlayingAnyAnim(playerPed, 1) always returns false, even while the skinning is running.

Is there a better way to detect when skinning starts and ends?
Or juste disable any loot after skinning (I try flag but not work )

I’ve read about using HasLootEventFired(ped, “MGEnd”) or _GET_ENTITY_LOOTING_PED, but I’m not sure which one is most reliable or how to combine them properly.

Thanks!

Ok i find a way, i use Decor to detect and it’s work perfectly.

            Natives.DecorSetBool(npc.pedHandle, "LootSkin", true);