Jump to content

Problema con engineLoadIFP


MaurO^

Recommended Posts

Tengo un problema cargando la animación personalizada, cuando escribo /anim dance1 la animación no comienza, si lo hago solo desde el lado del cliente, sin usar triggers esto si funciona ¿Es posible que no se pueda usar con triggers?

Client.lua:

local name = "bailes_fornite"

local IFP = engineLoadIFP( "bailes.ifp", name)

if not IFP then
    outputChatBox( "Fallo al cargar el archivo 'bailes.ifp'" )
end

function setAnimation(_, animationName)
    if IFP then
		--setPedAnimation(localPlayer, name, anim )
		triggerServerEvent("onAnim", localPlayer, name, animationName)
    end
end
addCommandHandler("anim", setAnimation)

Server.lua:

function animar(name, animationName)
	setPedAnimation(source, name, animationName)
end
addEvent("onAnim", true)
addEventHandler("onAnim", root, animar)

 

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