yoya99 Posted October 31, 2014 Share Posted October 31, 2014 hey there where is the error in this code addEventHandler ( "onPlayerWasted", root, function ( ) setPedAnimation ( source, knife_hit3 ) end ) Link to comment
Woovie Posted October 31, 2014 Share Posted October 31, 2014 setPedAnimation has 3 variables, it also needs to be a string unless it's a variable defined somewhere. Link to comment
yoya99 Posted October 31, 2014 Author Share Posted October 31, 2014 so can you make example ? Link to comment
Woovie Posted October 31, 2014 Share Posted October 31, 2014 That's what the wiki is for... https://wiki.multitheftauto.com/wiki/Se ... n#Example1 Link to comment
Moderators IIYAMA Posted October 31, 2014 Moderators Share Posted October 31, 2014 Players cannot make animations while dead. It is possible, but you have to prevent the player to die. Link to comment
xeon17 Posted October 31, 2014 Share Posted October 31, 2014 use cancelEvent to prevent a player to die (onPlayerWasted) Link to comment
yoya99 Posted October 31, 2014 Author Share Posted October 31, 2014 Thx will try out....cab somone help mw at the effects topic? Link to comment
Moderators IIYAMA Posted October 31, 2014 Moderators Share 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) Link to comment
yoya99 Posted November 1, 2014 Author Share Posted November 1, 2014 But what animation he makes? Link to comment
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