SA-MP Forums Archive
[suggestion] Chat hiding. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [suggestion] Chat hiding. (/showthread.php?tid=194690)



[suggestion] Chat hiding. - Whizion - 30.11.2010

I think this is really easy to add and that is very useful.

HideChatForPlayer(playerid);

So you can hide the chat for player.

Why is this useful?

It takes up valuable space, where you could put information for a brief time (like tutorials in SP when you spawn for the first time in the hospital).

Why don't you just spam the chat with empty messages?

Because then you lose messages that possibly might be important, and you can't receive any new messages.

All in all i think this is really easy to add because the code for this already exists (F7) so it just needs to be converted to a function.

Hope it gets added, if not in this version maybe in the next one.


Re: [suggestion] Chat hiding. - leong124 - 30.11.2010

If you just want to hide other players' chat, why don't use SendPlayerMessageToPlayer with an array that declares what players to be hidden for the chat?(Though it may be slower)


Re: [suggestion] Chat hiding. - Whizion - 30.11.2010

It would just waste memory if i was saving 100 lines of chat.

As i said, this is really easy to add, the code exists.


Re: [suggestion] Chat hiding. - Jay_ - 30.11.2010

A system is scriptable that can format all chat messages sent to the client but not process them, and show them later whenever the tutorial or whatever is finished.


Re: [suggestion] Chat hiding. - Vandooz - 30.11.2010

Quote:
Originally Posted by Jay_
Посмотреть сообщение
A system is scriptable that can format all chat messages sent to the client but not process them, and show them later whenever the tutorial or whatever is finished.
Yep, you can make the function your own, to put it in onplayertext .


Re: [suggestion] Chat hiding. - Whizion - 30.11.2010

Quote:
Originally Posted by Jay_
Посмотреть сообщение
A system is scriptable that can format all chat messages sent to the client but not process them, and show them later whenever the tutorial or whatever is finished.
Wouldn't that take up a lot of memory?


Re: [suggestion] Chat hiding. - 0ne - 30.11.2010

Actually, you can do a cmd which sets a variable to the player and onplayertext do your own system so if that a player has that variable don't send him the message maybe?


Re: [suggestion] Chat hiding. - DVDK - 30.11.2010

Quote:

TogglePlayerChat(bool:toggle);
TogglePlayerChatForPlayer(playerid, bool:toggle);

Is better, so you won't have to make:

Quote:

ShowChatForPlayer(playerid);
HideChatForPlayer(playerid);
ShowChatForAll();
HideChatForAll();




Re: [suggestion] Chat hiding. - Whizion - 30.11.2010

I already have a plan for my system, but thought maybe i share it so it gets added in 0.3c or upper.

* Whizion keeps his fingers crossed.


Re: [suggestion] Chat hiding. - RyDeR` - 30.11.2010

Why would you request that function while you can:
1) return false in OnPlayerText for that specific player to avoid his/her message appears in the chatbox.
2) Send (about 20) empty client messages to clear the chatbox.