Raised This Month: $ Target: $400
 0% 

Clear Chat


Post New Thread Reply   
 
Thread Tools Display Modes
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-04-2015 , 11:21   Re: Clear Chat
Reply With Quote #11

Quote:
Originally Posted by Arkarr View Post
I don't understand you... Just to be sure, by HUD I mean this.

Or, you can create all letter (like 'a') as materials and display them 1 by 1 on the player screen. But I don't think this would be a good way to solve this problem.
He means chat that written by players... Not hud msgs btw yoh know how to remove hud msgs?
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 08-04-2015 , 12:07   Re: Clear Chat
Reply With Quote #12

Quote:
Originally Posted by TheUnderTaker View Post
He means chat that written by players... Not hud msgs btw yoh know how to remove hud msgs?
Okay, you totally miss understood me (if I wasn't enough clear, then sorry.) !
I was about to ask to handle differently the chat message and instend of displaying them with the default chat, use HUD, wich are more maniabe (you can set the position, colors, etc...) AND you can remove them (well, set a lifetime = store message in array, remove the one you don't want, refresh the chat every X seconds.).
__________________
Want to check my plugins ?
Arkarr is offline
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 08-04-2015 , 13:37   Re: Clear Chat
Reply With Quote #13

Quote:
Originally Posted by Arkarr View Post
Still want to give a try if the policies thing is possible.

Gonna give a look ! But, wich kind of extension ? To render HUD wich a custom policie ?

Yeah... but it won't help at all, since you can't remove messages send with PrintToChat(); ...
I don't know why we're talk about HUD...

Anyways you can't remove messages because the chat messages are handled client sided, i'm saying you can just spam them with PrintToChatAll(), it won't remove the messages but it will hide them. Most people don't even scroll up the chat box anyways.

For the O.P.

Code:
public OnPluginStart() {
	RegConsoleCmd("sm_clearchat", ClearChat);
}

public Action:ClearChat(client, args) {
	for(new i = 0; i < 10; i++)
		PrintToChatAll(" ");
}
__________________

Last edited by Chaosxk; 08-04-2015 at 13:38.
Chaosxk is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 08-04-2015 , 15:26   Re: Clear Chat
Reply With Quote #14

Damn... I'm gonna leave a plugin here to let you see what I tought.
__________________
Want to check my plugins ?
Arkarr is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-04-2015 , 17:38   Re: Clear Chat
Reply With Quote #15

Spamming the chat is a bloody fucking stupid idea and a waste of the server's time and the incoming client's time. Why would you think spamming a client with data (even if it is merely empty strings) would be a borderline good idea?

What purpose does this feature accomplish anyway? This is just a performance and resource sink for almost nothing. (My 2 cents over this idea.)

EDIT: If you want to really clear the chat you would need to spam enough strings such that even scrolling up the chat shows nothing.

Last edited by Potato Uno; 08-04-2015 at 21:37.
Potato Uno is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode