Jump to content

Som Local


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...