Jump to content

[HELP]ERROR Animation CODE


mucuk6547

Recommended Posts

Hello I did an animation myself and give error, please help.

local customBlockName = "selam"

-- load the IFP file
local IFP = engineLoadIFP( "askeriselamani.ifp", selam )

-- let us know if IFP failed to load
if not IFP then
    outputChatBox( "Failed to load 'askeriselamani.ifp'" )
end

-- execute the command using /animation <NameOfCustomAnimation>
-- for example, /animation CartWheel
function setanimation( selam, askeriselamani )
    -- check if IFP file has loaded
    if IFP then
        -- now play our custom animation
        setPedAnimation( localPlayer, selam, askeriselamani.ifp )
    end
end
addCommandHandler( "selam", setanimation )
SERVER

ifp engineLoadIFP ( string askeriselamani.ifp, string selam )

IFP name:askeriselamani.ifp

https://hizliresim.com/4jD7oq

ERROR NAME: Failed to load 'askeriselamani.ifp'

 


 

Edited by mucuk6547
Link to comment

Hi @mucuk6547 !

          In line 4 of your client side code, you should supply a string to the argument 2 of 'engineLoadIFP'. Replace 'selam' in there with 'customBlockName'.

And your command function should look like below.



function setanimation( command, askeriselamani )    -- check if IFP file has loaded   
  if IFP then        -- now play our custom animation        
  setPedAnimation( localPlayer, customBlockName, askeriselamani )
  end
end
addCommandHandler( "selam", setanimation )

 

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