Jump to content

music help


K4stic

Recommended Posts

    addEventHandler('onVehicleEnter', root, 
    function ( ) 
        triggerClientEvent(source, 'Music', source) 
    end 
    ) 
     
     
    addEvent('Music', true) 
    addEventHandler('Music', root, 
    function ( ) 
        playSound('soundPath', true) 
    end 
    ) 

--or getElementsByType to get all players then play theSound .

Link to comment
    addEventHandler('onVehicleEnter', root, 
    function ( ) 
        triggerClientEvent(source, 'Music', source) 
    end 
    ) 
     
     
    addEvent('Music', true) 
    addEventHandler('Music', root, 
    function ( ) 
        playSound('soundPath', true) 
    end 
    ) 

--or getElementsByType to get all players then play theSound .

>->

He want's to play a sound when someone gets in a car, But he want's all players in the car to hear that sound

Your script will simply play a sound to the person who entered the vehicle or to everyone on the server.

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