zMpyster Posted February 20, 2019 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
androksi Posted February 20, 2019 Posted February 20, 2019 Veja este tópico já resolvido. É o mesmo conceito. 1 Hello, world. Tutorial sobre interação de BOTs do Discord com o seu servidor - Visitar (Brazilian Portuguese) Tutorial sobre tabelas - Visitar (Brazilian Portuguese) Tutorial sobre banco de dados - Visitar (Brazilian Portuguese)
vitormonk Posted February 26, 2019 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 Did I help you with anything? send a thank you Eu te ajudei com alguma coisa? envie um Thanks My Discord: sorry#3072 My Channel: goo.gl/C9QnxX
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