Jump to content

[HELP] Shot by sniper animation


Geralt

Recommended Posts

You could created a dummy ped and use GetPedAnimation on it after you shoot it with a sniper to fetch the animation that plays, it should give you both the block and animation.

From the wiki:

addEventHandler("onClientPreRender", root, function()
    local block, animation = getPedAnimation(localPlayer)
    dxDrawText ("CURRENT ANIMATION INFO...", 100, 300)
    if not block then block = "N/A" end
    if not animation then animation = "N/A" end
    dxDrawText("Block = "..block.." Animation = "..animation, 100, 315)
end)

 

Edited by Skully
Link to comment
  • MTA Anti-Cheat Team
On 05/06/2021 at 13:35, Geralt said:

I am looking for the animation that your character does when someone shoots you in the arm with a sniper. Any ideas how to find it?

Pretty sure it exists (as anim you can use with setPedAnimation), but just like you I don't know it from the back of my head.

Many GTA animations are named in a weird/obscure way, so you can't always figure out what something is based on its name (or the other way around, as in this case) so if it's out there you may have a hard time identifying it. GL!

Well, maybe there's some tool in GTA modding world that can log whatever animation you play, or you could try to create such a tool.

 

I have another last resort idea: you create a file debug.txt in MTA installation folder, launch MTA, and ask another player to shoot you with a sniper rifle (so you play the anim). Then, exactly while it's still playing, you crash MTA forcibly by holding left + right CTRL at the same time and releasing, which is what debug.txt is for.

Now you can wonder: why? Because in MTA 1.5.7 some debug code was added, that logs the last played anim (block id and name) before MTA crashed. This was done to investigate animation crashes.

But you can then open .dmp file from C:\Program Files (x86)\MTA San Andreas 1.5\MTA\dumps\private (right click > Edit in Notepad) and CTRL + F for this line: Current Animation Task Info

Then you'll find the answer at the bottom, looking like this:

dVScKuI.png

And you can look up which anim name from https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_sa/game_sa/eAnimations.h (make sure to carefully read the index and group id's, as each has their own set of id's that can match across them)

Really just depends on how far you want to take it

  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...