Jump to content

What's wrong with this


Cronoss

Recommended Posts

I want the bindkey stops the animations I'm going to add

function prueba(thePlayer)
	setPedAnimation(thePlayer, "finale", "fin_let_go", -1, false, false, false, false)
end
addCommandHandler("prueba", prueba)

function pararAnim(thePlayer, key, keyState)
	setPedAnimation(thePlayer)
end
bindKey( thePlayer, "space", "down", pararAnim )

 

Link to comment
2 minutes ago, Cronoss said:

I want the bindkey stops the animations I'm going to add

function prueba(thePlayer)
	setPedAnimation(thePlayer, "finale", "fin_let_go", -1, false, false, false, false)
end
addCommandHandler("prueba", prueba)

function pararAnim(thePlayer, key, keyState)
	setPedAnimation(thePlayer)
end
bindKey( thePlayer, "space", "down", pararAnim )

 

 

here thePlayer argument is invalid use for loop to add all players

addEventHandler("onResourceStart", resourceRoot,
    function()
       for _,thePlayer in ipairs(getElementsByType("player")) do
       	  bindKey(thePlayer, "space", "down", pararAnim)
       end
    end
)

function prueba(thePlayer)
	setPedAnimation(thePlayer, "finale", "fin_let_go", -1, false, false, false, false)
end
addCommandHandler("prueba", prueba)

function pararAnim(thePlayer, key, keyState)
	setPedAnimation(thePlayer)
end

 

if you want to add for single player you can put it inside prueba command i don't know how to use it

 

  • Thanks 1
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...