Jump to content

vehicle sound help


mehmetejr

Recommended Posts

Posted
  
triggerClientEvent ( [table/element sendTo=getRootElement()], string name, element sourceElement, [arguments...] ) 
  

You can't use root in this case use source, or thePlayer element you're using.

  
triggerClientEvent(source,"onLock",theVehicle) 
  

One more note, the first argument is optional, you can use

  
triggerClientEvent("onLock",theVehicle,thePlayer) 
  

And that's it, your client event "onLock" will play https://wiki.multitheftauto.com/wiki/PlaySound3D using https://wiki.multitheftauto.com/wiki/GetElementPosition of the vehicle, and the source element is thePlayer or localPlayer.

~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names.

~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.

 

  • Moderators
Posted

@ Mr.gSub

Stop talking bullshit and read the triggerClientEvent page yourself.

root is the result from getRootElement() function, which is the first optional argument from this function. So you can use both or none because it is optional.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted
@ Mr.gSub

Stop talking :~ and read the triggerClientEvent page yourself.

root is the result from getRootElement() function, which is the first optional argument from this function. So you can use both or none because it is optional.

Do you even hear yourself? gosh..

Anyway, sshh, help him, don't lecture me.

~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names.

~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.

 

  • Moderators
Posted

I don't help people who only care about the result, you should know that better then me.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted
I don't help people who only care about the result, you should know that better then me.

Why are you even posting here? for god sakes, did anyone tag you by mistake? if you're giving your opinion, I don't want to hear it, got something to say? PM, you're just wasting my time, if you're not here to help this guy, don't reply on his topic, that's simply wrong.

You can reply again, I won't answer, I got a life.

~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names.

~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.

 

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