Jump to content

How can I show the animation to each player? (.ifp)

Recommended Posts

Because the codes are client-sided, the players cannot see each other's animation.Which event or function should I use on the server side for the players to see each other's animation? I really need help.


local animTable = {

	ifp = {},

	anims = {


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)



Link to post

You trigger the event from server side to all clients with the player you change the animation and you check on each client if the player in cause is on screen and if so trigger the animation. This way all clients that are looking at the player will see the animation. There might be a better way I haven’t tested the animation functions yet.

Link to post
  • Scripting Moderators

As you did, onClientResourceStart, get all players and replace animation for them, and also onClientPlayerJoin, in case of latejoiners.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...