Jump to content

Hide player text chat


goofie88

Recommended Posts

Posted

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?

Posted (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 xD

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 by Guest
Posted
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 xD

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) 

?

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

Posted

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.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted
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

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

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