Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Expression 2 v
1 2 3 4 5 … 8 Next »
Hiding chat in E2
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Hiding chat in E2
18-02-2021, 09:56 PM, (This post was last modified: 18-02-2021, 10:08 PM by The17thDoctor. Edited 1 time in total.)
#1
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
Hiding chat in E2
While I'm not fond of using E2, I've noticed you could not ( properly ) hide chat messages using E2, perhaps it could be a good thing to have as some people likes to have such privacy.

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
18-02-2021, 10:27 PM, (This post was last modified: 18-02-2021, 10:30 PM by mariofludd. Edited 1 time in total.)
#2
mariofludd Offline
Novaaaaaaaaaaaaa
****
Posts: 528
Threads: 44
Joined: Dec 2013
RE: Hiding chat in E2
hideChat() is a thing in e2, however I've been trying for something like 30 minutes, and I can't do it, since you have to hide chat before you know what is being said, which then makes it impossible to chat normally

[Image: efN9HsZ.png]
Find
Reply
20-02-2021, 04:40 AM, (This post was last modified: 20-02-2021, 04:41 AM by 57e11a. Edited 1 time in total.)
#3
57e11a Offline
Cheating Donating Member
***
Posts: 198
Threads: 68
Joined: Apr 2019
RE: Hiding chat in E2
Just hideChat after you've made sure the prefix is right?

Code:
if(lastSaid():sub(1, 4) == "/gay") { hideChat(1) # other code goes here }

she/her
Founder of The Anisu Corporation
[Image: iZUefQi.gif]
Find
Reply
20-02-2021, 10:08 PM,
#4
mariofludd Offline
Novaaaaaaaaaaaaa
****
Posts: 528
Threads: 44
Joined: Dec 2013
RE: Hiding chat in E2
(20-02-2021, 04:40 AM)Consolio Wrote: Just hideChat after you've made sure the prefix is right?

Code:
if(lastSaid():sub(1, 4) == "/gay") { hideChat(1) # other code goes here }

Code:
O = owner() OLS = owner():lastSaid():lower():explode(" ") if(chatClk(O) & OLS[1, string] == "/uwu"){ hideChat(1)

this doesn't work

[Image: efN9HsZ.png]
Find
Reply
27-02-2021, 02:32 AM,
#5
Kosmos Offline
GMod Admin
Posts: 180
Threads: 3
Joined: Dec 2013
RE: Hiding chat in E2
(18-02-2021, 09:56 PM)The17thDoctor Wrote: While I'm not fond of using E2, I've noticed you could not ( properly ) hide chat messages using E2, perhaps it could be a good thing to have as some people likes to have such privacy.
As far as I know, hideChat does work to hide the message from users, but it is still visible to starfall chips. I don't think there's a way around this, as the chips (SF and E2s) have to be called in some order, and I assume it's rather difficult to alternate between SF and E2 constantly.

(20-02-2021, 10:08 PM)mariofludd Wrote:
Code:
O = owner() OLS = owner():lastSaid():lower():explode(" ") if(chatClk(O) & OLS[1, string] == "/uwu"){ hideChat(1)

this doesn't work
You're missing
Code:
runOnChat(1)
This is required so the code runs every time when someone sends a chat message.
Further, I recommend against using hideChat, bugs can make you unable to send messages (and thus ask for help) and you can't hide other people's messages anyway (making them unable to use your chat commands). All messages starting with '/' are hidden from chat by default.
Find
Reply
27-02-2021, 07:04 AM,
#6
mariofludd Offline
Novaaaaaaaaaaaaa
****
Posts: 528
Threads: 44
Joined: Dec 2013
RE: Hiding chat in E2
You're missing
Code:
runOnChat(1)
This is required so the code runs every time when someone sends a chat message.
Further, I recommend against using hideChat, bugs can make you unable to send messages (and thus ask for help) and you can't hide other people's messages anyway (making them unable to use your chat commands). All messages starting with '/' are hidden from chat by default.
[/quote]

I wasn't missing runOnChat, i didn't show the entire code, just the part that didn't work.
I'm not trying to hide from main chat, I'm trying to hide from starfall chips (chat listeners) and yes, hideChat works to prevent other peoples starfalls from seeing what you type.

[Image: efN9HsZ.png]
Find
Reply
27-02-2021, 10:17 PM, (This post was last modified: 27-02-2021, 10:31 PM by TheEnigma. Edited 3 times in total.)
#7
TheEnigma Offline
FGL Member #001
****
Posts: 82
Threads: 31
Joined: Nov 2016
RE: Hiding chat in E2
This is some code I use for all of my chat-controlled chips. It works pretty well, and hides your chips from chat, but it won't stop chat listeners.



Code:
if(chatClk(O)){ #Link's chat control. hideChat(1) ID = lastSaid():index(1) Line = lastSaid():sub(2):lower():explode(" ") Command = Line[1,string] if(ID == "/"){ Var1 = Line[2,string] #Command variable 1 Var2 = Line[3,string] #Command variable 2 if(Command == "prefix"){ #Command prefix if(Var1 == "Example"){ #Code } else{ hideChat(0) } } else{ hideChat(0) } }

[Image: 207802.jpg]
Find
Reply
27-02-2021, 10:21 PM,
#8
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
RE: Hiding chat in E2
What is that supposed to prove though ? E2 can indeed hide chat from players but not from starfalls, which is what Nova is searching to do. As Kosmos mentioned, it won't hide other people's commands ( like SF ) but given the rarity of other people using our own chips, I'd say it's still worth it.

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
27-02-2021, 10:33 PM,
#9
mariofludd Offline
Novaaaaaaaaaaaaa
****
Posts: 528
Threads: 44
Joined: Dec 2013
RE: Hiding chat in E2
The point is that this only hides from chat. I'm trying to hide it from Starfall So this doesn't help at all.

[Image: efN9HsZ.png]
Find
Reply
27-02-2021, 11:07 PM,
#10
TheEnigma Offline
FGL Member #001
****
Posts: 82
Threads: 31
Joined: Nov 2016
RE: Hiding chat in E2
Ok, this is hardly an elegant way to do it, but if you really want to be secure, you can use a wire Text Entry with prompt wired to a numpad input. When you press the key assigned to the input, a prompt will show up to write some text. Once you do, the Text Entry then outputs your written text as a string for however many seconds you set. Since this doesn't use chat its 100% secure (unless someone installed a key logger on your computer, or something).

[Image: 207802.jpg]
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread:
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.