Tekken Posted November 17, 2014 Posted November 17, 2014 This script should play zombies moan. But nothing hapend Client local zombies = getElementsByType ( "ped" ) for theKey,theZomb in ipairs(zombies) do if (isElement(theZomb)) then if (getElementData (theZomb, "zombie") == true) then setPedVoice(theZomb, "PED_TYPE_DISABLED") end end end addEvent( "Zomb_Moan", true ) function Zmoan ( ped, randnum ) if (isElement(ped)) then local Zx,Zy,Zz = getElementPosition( ped ) local sound = playSound3D("sounds/mgroan"..randnum..".ogg", Zx, Zy, Zz, false) setSoundMaxDistance(sound, 20) end end addEventHandler( "Zomb_Moan", getRootElement(), Zmoan ) Server function zmoan(zombie) if moancount < moanlimit then moancount = moancount+1 local randnum = math.random( 1, 10 ) triggerClientEvent ( "Zomb_Moan", getRootElement(), zombie, randnum ) setTimer ( ReduceMoancount, 800, 1 ) end end 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!
Tekken Posted November 17, 2014 Author Posted November 17, 2014 REFRESH ! 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!
Tekken Posted November 18, 2014 Author Posted November 18, 2014 Nobody 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!
Moderators IIYAMA Posted November 18, 2014 Moderators Posted November 18, 2014 https://wiki.multitheftauto.com/wiki/Debugging#Debug_strategies 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
Tekken Posted November 18, 2014 Author Posted November 18, 2014 https://wiki.multitheftauto.com/wiki/Debugging#Debug_strategies I don't get any error i tried with /debugscript 3 and nothing 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!
TAPL Posted November 18, 2014 Posted November 18, 2014 You didn't show where you have called the function zmoan at server side.
Moderators IIYAMA Posted November 18, 2014 Moderators Posted November 18, 2014 https://wiki.multitheftauto.com/wiki/Debugging#Debug_strategies I don't get any error i tried with /debugscript 3 and nothing I am not just talking about /debugscript 3. I am talking about the other strategies, as you would see if you did read the page carefully. 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
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