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
Moderators IIYAMA Posted November 18, 2014 Moderators Posted November 18, 2014 https://wiki.multitheftauto.com/wiki/Debugging#Debug_strategies
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
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.
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