yoya99 Posted October 31, 2014 Posted October 31, 2014 hey there where is the error in this code addEventHandler ( "onPlayerWasted", root, function ( ) setPedAnimation ( source, knife_hit3 ) end ) And the snail starts to sing
Woovie Posted October 31, 2014 Posted October 31, 2014 setPedAnimation has 3 variables, it also needs to be a string unless it's a variable defined somewhere. "The humble beet is the answer to all riddles." - Rolf
yoya99 Posted October 31, 2014 Author Posted October 31, 2014 so can you make example ? And the snail starts to sing
Woovie Posted October 31, 2014 Posted October 31, 2014 That's what the wiki is for... https://wiki.multitheftauto.com/wiki/Se ... n#Example1 "The humble beet is the answer to all riddles." - Rolf
Moderators IIYAMA Posted October 31, 2014 Moderators Posted October 31, 2014 Players cannot make animations while dead. It is possible, but you have to prevent the player to die. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
yoya99 Posted October 31, 2014 Author Posted October 31, 2014 Do how to do it? And the snail starts to sing
xeon17 Posted October 31, 2014 Posted October 31, 2014 use cancelEvent to prevent a player to die (onPlayerWasted) A unique GangWar gamemode waiting for you!Click here for more information.
yoya99 Posted October 31, 2014 Author Posted October 31, 2014 Thx will try out....cab somone help mw at the effects topic? And the snail starts to sing
Moderators IIYAMA Posted October 31, 2014 Moderators Posted October 31, 2014 Do how to do it? Something like this. You can't prevent the dead, but you can prevent dying/getting hurt. local dataTransferLimiter = false addEventHandler("onClientPlayerDamage",localPlayer, function (attacker, weapon, bodypart,loss) if not dataTransferLimiter and getElementHealth(source) <= loss then triggerServerEvent("doDeadAnimation",localPlayer) dataTransferLimiter = true cancelEvent() end end) addEventHandler("onClientPlayerSpawn",localPlayer, function () dataTransferLimiter = false end) addEvent("doDeadAnimation",true) addEventHandler("doDeadAnimation",root, function () if isElement(client) then end end) Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
yoya99 Posted November 1, 2014 Author Posted November 1, 2014 But what animation he makes? And the snail starts to sing
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now