goofie88 Posted February 24, 2013 Posted February 24, 2013 I wanted to try to hide chat of players that write in chatbox but at the same time I dont want to hide the chat HUD. is it possible to make so that if player isnt logged in he doesnt see other players chatting to each other?
goofie88 Posted February 24, 2013 Author Posted February 24, 2013 (edited) Ah showChat doesnt hide the HUD? ah damn I saw it and read the wiki about it and didn't pay attention haha im so dumb thanks Edit: actually no it hides the Chat, I need to chat to be shown but I dont want other players chatting in there, i dont want to disable chatting just to the source not seeing the other players talking but seeing outputChatbox Edited February 24, 2013 by Guest
tosfera Posted February 24, 2013 Posted February 24, 2013 Ah showChat doesnt hide the HUD? ah damn I saw it and read the wiki about it and didn't pay attention haha im so dumb thanks Edit: actually no it hides the Chat, I need to chat to be shown but I dont want other players chatting in there, i dont want to disable chatting just to the source not seeing the other players talking but seeing outputChatbox something like addEventHandler("onPlayerchat", root, function ( ) cancelEvent() end) ?
goofie88 Posted February 24, 2013 Author Posted February 24, 2013 won't this hide every chat text when the players type?
Anderl Posted February 24, 2013 Posted February 24, 2013 Use the event onPlayerChat event with cancelEvent and outputChatBox. In the event's function create an array and store player elements that are logged in, cancel the event and output the message again ONLY to the players stored in the array.
tosfera Posted February 24, 2013 Posted February 24, 2013 won't this hide every chat text when the players type? okee you want players not to chat but you want them to see the outputChatBox msg's, well then just cancel the event, if you want to make it for admins only, lookup if the name is in the ACL, if you want registered uesrs only, check if its an account or not. O_O
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