Jump to content

Animation reloading and aiming bug


delta1337

Recommended Posts

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

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

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