Jump to content

HELP MAKE ANIM CHAT


roddydennvor

Recommended Posts

onPlayerChat will trigger whenever a player chats, we check for message_type to make sure that it's normal chat, not team nor /me. string.len will get the number of characters in the message.

The fourth parameter in setPedAnimation is the time in milliseconds, that's why we multiplied the seconds by 1000 to get the milliseconds. You just need to replace block and anim with a string.

addEventHandler("onPlayerChat", root, function(message, message_type) 
 if (message_type) ~= 0 then return end 
 local seconds = string.len(message) 
 setPedAnimation(source, block, anim, seconds * 1000) --Specify the animation details 
end) 

Link to comment
can you explain me what i must to fill in block ?

at anim i must to fill anim type right ?

Required Arguments

thePed: the player or ped you want to apply an animation to.

Optional Arguments

NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments.

block: the animation block's name.

anim: the name of the animation within the block.

time: how long the animation will run for in milliseconds.

loop: indicates whether or not the animation will loop.

updatePosition: will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations.

interruptable: if set to 'false' other tasks wont be able to interupt the animation. Setting this to 'false' also gives this function more power to override other animations that are running. For example, squatting after a jump can be terminated.

freezeLastFrame: ... (From 1.1 onwards).

Link to comment

Solve :

Optional Arguments

NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments.

block: the animation block's name.

anim: the name of the animation within the block.

time: how long the animation will run for in milliseconds.

loop: indicates whether or not the animation will loop.

updatePosition: will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations.

interruptable: if set to 'false' other tasks wont be able to interupt the animation. Setting this to 'false' also gives this function more power to override other animations that are running. For example, squatting after a jump can be terminated.

freezeLastFrame: ... (From 1.1 onwards).

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