Karuzo Posted January 19, 2014 Share 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 ? Link to comment
Anubhav Posted January 19, 2014 Share Posted January 19, 2014 outputChatBox("TEXT",thePlayer,255,69,0) Try it. Link to comment
50p Posted January 19, 2014 Share Posted January 19, 2014 If you used it in onVehicleEnter, then obviously source is vehicle. Link to comment
Forrest Posted January 19, 2014 Share 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. Link to comment
Karuzo Posted January 19, 2014 Author Share 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) Link to comment
Moderators IIYAMA Posted January 19, 2014 Moderators Share Posted January 19, 2014 As you can see player is already defined, in the parameters. outputChatBox("TEXT",player,255,69,0) Link to comment
Karuzo Posted January 19, 2014 Author Share Posted January 19, 2014 Oh. didn't noticed that. Thank you IIYAMA Link to comment
Moderators IIYAMA Posted January 19, 2014 Moderators Share Posted January 19, 2014 np. 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