zMpyster Posted February 20, 2019 Share Posted February 20, 2019 function buzina() if isPedInVehicle(localPlayer) then local oni = getPedOccupiedVehicle(localPlayer) local motorista = getVehicleController(oni) if motorista == localPlayer then local id = getElementModel(oni) if id == 537 then local x,y,z = getElementPosition(oni) local oni = getPedOccupiedVehicle(localPlayer) addEventHandler ( "onClientRender", getRootElement(), cc ) end end end end bindKey("h", "down", buzina) soundinside2 = {} function cc() local abc = getPedOccupiedVehicle(localPlayer) soundinside2[abc] = playSound3D("tremb.mp3", 0,0,0) attachElements(soundinside2[abc], abc) setSoundVolume(soundinside2[abc], 2.3) setSoundMinDistance(soundinside2[abc], 5) setSoundMaxDistance(soundinside2[abc], 300) setTimer( function() removeEventHandler ( "onClientRender", getRootElement(), cc ) end, 3500,1) end Quando algum player estiver em um trem e pressionar H era pra sair um buzina que todos conseguissem ouvir, más, só ele ouve, alguém ajuda Link to comment
Other Languages Moderators androksi Posted February 20, 2019 Other Languages Moderators Share Posted February 20, 2019 Veja este tópico já resolvido. É o mesmo conceito. 1 Link to comment
vitormonk Posted February 26, 2019 Share Posted February 26, 2019 (edited) soundinside2[abc] = playSound3D("tremb.mp3", getElementPosition( source )) ou soundinside2[abc] = playSound3D("tremb.mp3", getElementPosition( thePlayer )) Altere a Linha "20" Edited February 26, 2019 by docscr Link to comment
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