Xwad Posted July 28, 2015 Author Posted July 28, 2015 now its working but ts another problem again my god. When i die the sound dont stops:/
GTX Posted July 28, 2015 Posted July 28, 2015 local sound setTimer(function() if isPedDead(localPlayer) then return end local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle and getElementModel(vehicle) ~= 476 then local vx,vy,vz = getElementVelocity(vehicle) if vx+vy+vz == 0 then if sound then setSoundPaused(sound,true) end else if not sound then sound = playSound("sounds/sound.mp3") setSoundVolume(sound, 0.1) else setSoundPaused(sound,false) end end elseif sound then setSoundPaused(sound,true) end end,1000,0) function stopSound() setSoundPaused(sound, true) end addEventHandler("onClientPlayerWasted", root, stopSound) Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
Buffalo Posted July 28, 2015 Posted July 28, 2015 local sound setTimer(function() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle and getElementModel(vehicle) ~= 476 then local vx,vy,vz = getElementVelocity(vehicle) if vx+vy+vz == 0 then if sound then setSoundPaused(sound,true) end else if not sound then sound = playSound("sounds/sound.mp3") setSoundVolume(sound, 0.1) else setSoundPaused(sound,false) end end elseif sound then setSoundPaused(sound,true) end end,1000,0) --anonymous function attached to you addEventHandler("onClientPlayerWasted", localPlayer, function() if isElement(sound) then setSoundPaused(sound, true) end end) Powered by Kimsufi© ☢ ZHP on Facebook ☢ ZHP on Youtube ☢ Support us ☢
Xwad Posted July 31, 2015 Author Posted July 31, 2015 shit its bugging again!! I play and after a few minutes the sound dont works anymore and this is the debug script: WARNING: sound/client.lua:9 Bad 'sound/player' pointer @ 'setSoundPaused'(1) and if i press w then it says WARNING: sound/client.lua:16 Bad 'sound/player' pointer @ 'setSoundPaused'(1) pls help!
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