Jump to content

Animation won't stop


Yunix

Recommended Posts

Posted

I created a talk animation on chat but after i put the value "1" in the time parameter i can walk with the animation but it can't be stopped.

It just ignores setPedAnimation(source) or something.

Also the hands are not moving when the animation finishes.

Is there a fix for this?

Posted
  
setPedAnimation( source, "GANGS", "prtial_gngtlkB", 1, false, true, true, true, false ) 
setTimer(function() 
    setPedAnimation(source, false) 
end, 1000, 1) 
  

Posted

Logical, source is not defined.

Add it to the timer:

setTimer(function(tPlayer) 
    setPedAnimation(tPlayer, false) 
end, 1000, 1, source) 

Posted
Logical, source is not defined.

Add it to the timer:

setTimer(function(tPlayer) 
    setPedAnimation(tPlayer, false) 
end, 1000, 1, source) 

That is the same thing as what he posted above.

Posted (edited)
That is the same thing as what he posted above.

No, it isn't.

end, 1000, 1) 

end, 1000, 1, source) 

He posted a fix. It should work. I also have to add:

setTimer(function(tPlayer) 
    setPedAnimation(tPlayer, nil) 
end, 1000, 1, source) 

Edited by Guest
Posted
Logical, source is not defined.

Add it to the timer:

setTimer(function(tPlayer) 
    setPedAnimation(tPlayer, false) 
end, 1000, 1, source) 

That is the same thing as what he posted above.

No, it is not. setTimer has no 'source' and that is why you have to send the 'source' as a argument.

Posted

Works if the time parameter is above 50 but that's the problem, i want it between 1 and 50 because then you're able to walk and have the animation at the same time. If the time parameter is above 50/100 you can't do that.

Posted
Works if the time parameter is above 50 but that's the problem, i want it between 1 and 50 because then you're able to walk and have the animation at the same time. If the time parameter is above 50/100 you can't do that.
setTimer 

Read the wiki, then you will see that the limit = 50 ms.

Posted
addEventHandler("onPlayerJoin",root,function() 
    setTimer(function() 
        outputChatBox("Message!",source); -- source is valid, it's inside the scope; 
    end,1000,1); 
end); 

addEventHandler("onPlayerJoin",root,function() 
    setTimer(function(player) -- useless; 
        outputChatBox("Message!",player); 
    end,1000,1,source); 
end); 

Posted

Cheez3D, if you don't know how it works, please don't react. Go test your own script which you posted by yourself. I did too, and it posted for everyone. setTimer does NOT have a source. How can you think about outputting it then? setTimer doesn't 'remember' the source+arguments you sended withing the function, that's why you have to put them in the setTimer.

Posted

Well sure the limit is 50, but is there a other way to achieve what i wanted?

To make walking + having the talk animation at the same time possible?

The only way i know now is putting the time below 50.

Posted

No not exactly, i already made it so when you chat you get the animation but i want to allow the player walk while doing the animation.

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