Cynoq Posted December 21, 2015 Posted December 21, 2015 I am having a glitch with my server, which is pretty much game breaking. I am not very experienced with lua so I cannot not locate the problem. In dayz you survive by drinking water, eating food right? Well essentially whenever a player eats, drinks, blood bags, medkits etc there is a player animation that plays for about 3 seconds, but the problem I am having is the animation won't stop. If anyone has any idea how to fix this a comment would be greatly appreciated. Thanks in advance!
Addlibs Posted December 21, 2015 Posted December 21, 2015 Which version of DayZ are you using? The new open-source version or the older one? Previously known as MrTasty.
Cynoq Posted December 21, 2015 Author Posted December 21, 2015 Which version of DayZ are you using? The new open-source version or the older one? 0.6 Nighlty I think it is
MTA Team 0xCiBeR Posted December 22, 2015 MTA Team Posted December 22, 2015 That version is closed-source and does have a bug animation. You should use new open source version: https://github.com/mtadayz/MTADayZ DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Tekken Posted December 22, 2015 Posted December 22, 2015 Use this Client-Side: setTimer(function() Anim,_ = getPedAnimation(getLocalPlayer()); if (Anim) then setPedAnimation(getLocalPlayer(), false); end end, 2000, 0); You may change the timer duration to catch the animation. Resources I made: attachToBones - A newer bone_attach. Simple Level system - Just a simple level system. Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!
1LoL1 Posted December 22, 2015 Posted December 22, 2015 Use this on medic and use this on all setPedAnimation. function onPlayerUseMedicObject(itemName) local playersource = source setPedAnimation(playersource, "BOMBER", "BOM_Plant", -1, false, false, nil, false)
Cynoq Posted December 22, 2015 Author Posted December 22, 2015 That version is closed-source and does have a bug animation. You should use new open source version: https://github.com/mtadayz/MTADayZ I tried using this but it was very buggy and didn't load textures, and has a lot of things I do not want in DayZ.
Cynoq Posted December 22, 2015 Author Posted December 22, 2015 Use this Client-Side: setTimer(function() Anim,_ = getPedAnimation(getLocalPlayer()); if (Anim) then setPedAnimation(getLocalPlayer(), false); end end, 2000, 0); You may change the timer duration to catch the animation. I'm new to this. Where would I put this code exactly? Thanks for the help.
1LoL1 Posted December 22, 2015 Posted December 22, 2015 Use this Client-Side: setTimer(function() Anim,_ = getPedAnimation(getLocalPlayer()); if (Anim) then setPedAnimation(getLocalPlayer(), false); end end, 2000, 0); You may change the timer duration to catch the animation. I'm new to this. Where would I put this code exactly? Thanks for the help. In client-side.
Cynoq Posted December 22, 2015 Author Posted December 22, 2015 Use this Client-Side: setTimer(function() Anim,_ = getPedAnimation(getLocalPlayer()); if (Anim) then setPedAnimation(getLocalPlayer(), false); end end, 2000, 0); You may change the timer duration to catch the animation. I'm new to this. Where would I put this code exactly? Thanks for the help. In client-side. Can't find "client-side"
1LoL1 Posted December 22, 2015 Posted December 22, 2015 Client-Side is "client.lua" or find in meta.xml.
Cynoq Posted December 23, 2015 Author Posted December 23, 2015 Client-Side is "client.lua" or find in meta.xml. You fixed it! You are a life saver man! I wish I could thank you more! Thank you!
1LoL1 Posted December 23, 2015 Posted December 23, 2015 Client-Side is "client.lua" or find in meta.xml. You fixed it! You are a life saver man! I wish I could thank you more! Thank you! You're welcome.
Cynoq Posted December 23, 2015 Author Posted December 23, 2015 Client-Side is "client.lua" or find in meta.xml. You fixed it! You are a life saver man! I wish I could thank you more! Thank you! You're welcome. Hey I noticed something about that code. It stops all animations after 2 seconds. Do you know a way to only stop a certain animation?
Tekken Posted December 23, 2015 Posted December 23, 2015 Hey I noticed something about that code. It stops all animations after 2 seconds. Do you know a way to only stop a certain animation? Using this: local blockAnims = { "BOM_Plant", }; -- You will have to do others by yourself! setTimer(function() Block, AnimationName = getPedAnimation(getLocalPlayer()); for _,v in ipairs(blockAnims) do if (AnimationName == v) then setPedAnimation(getLocalPlayer(), false); end end end, 2000, 0); Resources I made: attachToBones - A newer bone_attach. Simple Level system - Just a simple level system. Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!
Cynoq Posted December 24, 2015 Author Posted December 24, 2015 Hey I noticed something about that code. It stops all animations after 2 seconds. Do you know a way to only stop a certain animation? Using this: local blockAnims = { "BOM_Plant", }; -- You will have to do others by yourself! setTimer(function() Block, AnimationName = getPedAnimation(getLocalPlayer()); for _,v in ipairs(blockAnims) do if (AnimationName == v) then setPedAnimation(getLocalPlayer(), false); end end end, 2000, 0); Found the other animations I needed and the problem is fixed, all thanks to you. Thanks for everything man!
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