Karuzo Posted January 19, 2014 Posted January 19, 2014 So heres me problem : I've got an outputChatBox Server-Sided and i tried to just output it for the player who enters a vehicle.. Well , i tried it with source, but it didn't worked. everybody has saw the message. So i've tried it like that : outputChatBox("TEXT",source,255,69,0) I think i could trigger it to the Client . but i think there would be an easier way ?
Anubhav Posted January 19, 2014 Posted January 19, 2014 outputChatBox("TEXT",thePlayer,255,69,0) Try it. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
50p Posted January 19, 2014 Posted January 19, 2014 If you used it in onVehicleEnter, then obviously source is vehicle. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
Forrest Posted January 19, 2014 Posted January 19, 2014 outputChatBox("TEXT",thePlayer,255,69,0) Try it. That would only make sense if he defined the player as thePlayer, you should probably stop post-whoring because it's becoming obvious with your copious amount of fails. @OP post the whole function and we'll see what do brah.
Karuzo Posted January 19, 2014 Author Posted January 19, 2014 addEventHandler("onVehicleEnter",getRootElement(),function ( player,seat) if seat == 0 then triggerClientEvent("ChatMessage",getRootElement()) local enginestate = getElementData(source,"engine") if not enginestate then setElementData(source,"engine",false) enginestate = false end if enginestate == false then setVehicleEngineState(source,false) end bindKey(player,"l","down",light_func,player) bindKey(player,"x","down",motor_func,player) end end)
Moderators IIYAMA Posted January 19, 2014 Moderators Posted January 19, 2014 As you can see player is already defined, in the parameters. outputChatBox("TEXT",player,255,69,0) 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
Karuzo Posted January 19, 2014 Author Posted January 19, 2014 Oh. didn't noticed that. Thank you IIYAMA
Moderators IIYAMA Posted January 19, 2014 Moderators Posted January 19, 2014 np. 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
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