mehmetejr Posted December 17, 2014 Posted December 17, 2014 triggerClientEvent( root,-- target "onLock",-- event vehicle -- vehicle = source ) What I have to write instead of "unlock" ?
AJXB Posted December 17, 2014 Posted December 17, 2014 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 IIYAMA Posted December 17, 2014 Moderators Posted December 17, 2014 @ 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 Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
AJXB Posted December 17, 2014 Posted December 17, 2014 @ Mr.gSubStop 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 IIYAMA Posted December 17, 2014 Moderators Posted December 17, 2014 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 Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
AJXB Posted December 17, 2014 Posted December 17, 2014 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.
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