Jump to content

Animations Help (ped.ifp)


Recommended Posts

  • Scripting Moderators
25 minutes ago, Soull_Sec said:

I put custom animations on my server, but only I can see them in

my character, the character of the others continues with the original

animations of GTA, what can this be and how to solve it? HELP ?

"This function only affects a specific player or ped, the internal animation is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.", after loading IFP loop all players, and replace animation for them, aswell you will need onClientPlayerJoin to replace animation for him (if he joined late).

Link to comment
1 hour ago, majqq said:

"This function only affects a specific player or ped, the internal animation is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.", after loading IFP loop all players, and replace animation for them, aswell you will need onClientPlayerJoin to replace animation for him (if he joined late).

 

I started learning .moon recently, would it be like that?

 

addEventHandler("onClientPlayerJoin", resourceRoot,
    function()

        animTable.ifp["block"] = "ped"
        animTable.ifp["ifp"] = engineLoadIFP("ped.ifp", animTable.ifp["block"])

        for _, v in ipairs(animTable.anims) do
            engineReplaceAnimation(localPlayer, "ped", v, animTable.ifp["block"], v)
        end

    end
)
 

 

Link to comment
  • Scripting Moderators
2 hours ago, Soull_Sec said:

 

I started learning .moon recently, would it be like that?

 

addEventHandler("onClientPlayerJoin", resourceRoot,
    function()

        animTable.ifp["block"] = "ped"
        animTable.ifp["ifp"] = engineLoadIFP("ped.ifp", animTable.ifp["block"])

        for _, v in ipairs(animTable.anims) do
            engineReplaceAnimation(localPlayer, "ped", v, animTable.ifp["block"], v)
        end

    end
)
 

 

Yes, but load IFP just once. This should work correct if player latejoined, now just do the same, with all players when you loaded IFP (so if you started or restarted resource it will affect all players)

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...