Soull_Sec Posted June 3, 2020 Share Posted June 3, 2020 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 c: Link to comment
Scripting Moderators ds1-e Posted June 3, 2020 Scripting Moderators Share Posted June 3, 2020 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
Soull_Sec Posted June 3, 2020 Author Share Posted June 3, 2020 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 ds1-e Posted June 3, 2020 Scripting Moderators Share Posted June 3, 2020 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
Soull_Sec Posted June 7, 2020 Author Share Posted June 7, 2020 I managed to make it work, thank you very much for your help Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now