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 )
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.
Woovie Posted October 31, 2014 Posted October 31, 2014 That's what the wiki is for... https://wiki.multitheftauto.com/wiki/Se ... n#Example1
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.
xeon17 Posted October 31, 2014 Posted October 31, 2014 use cancelEvent to prevent a player to die (onPlayerWasted)
yoya99 Posted October 31, 2014 Author Posted October 31, 2014 Thx will try out....cab somone help mw at the effects topic?
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)
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