Jump to content

[HELP] Custom Animations


overlocus

Recommended Posts

I have custom walking animations. (ped anim)

But this script seems only me too. No one else can see

I want everyone can see all players animations see

(Sorry my bad english.)

local animTable = {

	ifp = {},

	anims = {
		"abseil",  (EXAMPLE)
		"WOMAN_walkshop",
		"XPRESSscratch"
	}

}

addEventHandler("onClientResourceStart", 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
22 minutes ago, overlocus said:

Is this script prove all player can see everyone's animations?

Don't know what you mean by prove.

22 minutes ago, overlocus said:

Can everyone see each other's animations?

Yes, by having the client send onCustomAnimationSet and the server broadcast onClientCustomAnimationSet to all joined players, and caching the current anim so that new players joining also get the sync. onClientCustomAnimationSet then sets the custom animation on each client it is sent to.

You could have gotten all of that just by reading the code, without having to ask us.

Edited by MrTasty
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...