delta1337 Posted August 12, 2018 Share Posted August 12, 2018 Hello guys! Since the new code for replacing animation came out, i wanted to add it on my server. I added some new animation for ped.ifp, and rifle.ifp, but there is a bug, when your aiming and reloading animation looks like this (chekout screens), but when your crouching and aiming, animation looks fine, but when you stand up, it is still bugged, i tried it even on a clear local server, other animations look fine, only i got problem with this one, i even download many other rifle.ifps, but it was still bugged. Do you guys know what causes this bug? And how to fix it? (here are the screens) https://imgur.com/a/OqUOfiK Link to comment
Saml1er Posted August 12, 2018 Share Posted August 12, 2018 (edited) can you please give me the names of animations that you are trying to replace? Edited August 12, 2018 by Saml1er Link to comment
delta1337 Posted August 13, 2018 Author Share Posted August 13, 2018 Sure, here you go. Quote local animTable = { ifp = {}, anims = { "RIFLE_fire_poor", "RIFLE_crouchfire", "RIFLE_crouchload", "RIFLE_fire", "RIFLE_load" } } - there are the animations which i am replacing setTimer(function() for _,player in ipairs(getElementsByType("player")) do if getElementData(player,"buggy")~=1 then for _, v in ipairs(animTable.anims) do engineReplaceAnimation(player, "rifle", v, animTable.ifp["block"], v) end end end end,35000,0) addEventHandler("onClientResourceStart", resourceRoot, function() animTable.ifp["block"] = "rifle" animTable.ifp["ifp"] = engineLoadIFP("rifle.ifp", animTable.ifp["block"]) for _,players in pairs(getElementsByType("player")) do for _, v in ipairs(animTable.anims) do engineReplaceAnimation(players, "rifle", v, animTable.ifp["block"], v) setElementData(players,"buggy",1) end end end ) and - this is the code which i am using to replace the animation Link to comment
Saml1er Posted August 16, 2018 Share Posted August 16, 2018 (edited) RIFLE_fire_poor RIFLE_fire RIFLE_load These three animations are partial, you cannot replace them. For more info, read: https://wiki.multitheftauto.com/wiki/EngineReplaceAnimation @delta1337 Edited August 16, 2018 by Saml1er Link to comment
delta1337 Posted August 17, 2018 Author Share Posted August 17, 2018 Thanks for reply, im gonna read out, and try to do that. 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