K4stic Posted March 18, 2013 Share Posted March 18, 2013 Guys help me pls how make if player addEventHandler("onClientVehicleEnter", root, if (seat == 0) and (sound) or (seat == 0) and (mysound) then end) to play music and to other's in car (the code not full that because i ask help) Link to comment
PaiN^ Posted March 18, 2013 Share Posted March 18, 2013 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 Link to comment
iPrestege Posted March 18, 2013 Share Posted March 18, 2013 If well : triggerClientEvent addEvent addEventHandler -- Use the event onVehicleEnter Server Side And The Sound Client And Trigger The Event When You Want To Play The Sound. Link to comment
Ab-47 Posted March 19, 2013 Share Posted March 19, 2013 And you may also want to use: playSound with getPedOccupiedVehicle Link to comment
X-SHADOW Posted March 19, 2013 Share Posted March 19, 2013 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
Ab-47 Posted March 19, 2013 Share Posted March 19, 2013 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
X-SHADOW Posted March 19, 2013 Share Posted March 19, 2013 and also i told him he can use getElementsByType ! 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