Jump to content

music help


K4stic

Recommended Posts

Posted

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)

Giving a Fuck? Nope, That isn't in My Skill Set

castie11.png

Posted

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

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted

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. 

  

Posted

And you may also want to use:

playSound 

with

getPedOccupiedVehicle 

And now Aurora is back again, pm for more info.

Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA.

Ex. Developer at Community of Social Gamers - CSG

Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP

9o6E8.png Ab-47

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

My ingame nickname : Ops!

-DeathMatch GameMode By Ops! : 5%

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

And now Aurora is back again, pm for more info.

Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA.

Ex. Developer at Community of Social Gamers - CSG

Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP

9o6E8.png Ab-47

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