Sign in to follow this  

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 )
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)

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

Share this post

Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.