Sign in to follow this  
xuaNN

How to change sword animations with ifp

Recommended Posts

Posted (edited)

Hello everybody, I uploaded to my server a new sword animation, but i can't change original sword animations with my new ifp. how can i do it?

 

Edited by xuaNN

Share this post


Link to post
Posted (edited)

https://wiki.multitheftauto.com/wiki/EngineLoadIFP

https://wiki.multitheftauto.com/wiki/EngineReplaceAnimation

swordAnimations = {
'sword_1',
'sword_2',
'sword_3',
'sword_4',
'sword_block',
'sword_hit_1',
'sword_hit_2',
'sword_hit_3',
'sword_idle',
'sword_part'
}


local IFP = engineLoadIFP( "sword.ifp", 'sword.custom' )

if IFP then
	for i,v in pairs(swordAnimations) do
		engineReplaceAnimation( localPlayer, "sword", v, 'sword.custom', v )
	end
else
	print('Failed to load - ','Sword.ipf')
end

Not tested, but should work, ensure to define it in meta properly and run that client side for everyone.

Edited by CodyJ(L)

Share this post


Link to post

This worked for me after some edits. Thank you man.

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.