![]() |
|
Hiding chat in E2 - Printable Version +- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk) +-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html) +--- Forum: Expression 2 (https://teamscm.co.uk/forum-6.html) +--- Thread: Hiding chat in E2 (/thread-3612.html) |
Hiding chat in E2 - The17thDoctor - 18-02-2021 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. RE: Hiding chat in E2 - mariofludd - 18-02-2021 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 RE: Hiding chat in E2 - 57e11a - 20-02-2021 Just hideChat after you've made sure the prefix is right? Code: if(lastSaid():sub(1, 4) == "/gay") {
hideChat(1)
# other code goes here
}RE: Hiding chat in E2 - mariofludd - 20-02-2021 (20-02-2021, 04:40 AM)Consolio Wrote: Just hideChat after you've made sure the prefix is right? Code: O = owner()
OLS = owner():lastSaid():lower():explode(" ")
if(chatClk(O) & OLS[1, string] == "/uwu"){
hideChat(1)this doesn't work RE: Hiding chat in E2 - Kosmos - 27-02-2021 (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:You're missing Code: runOnChat(1)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. RE: Hiding chat in E2 - mariofludd - 27-02-2021 You're missing Code: runOnChat(1)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. RE: Hiding chat in E2 - TheEnigma - 27-02-2021 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)
}
}RE: Hiding chat in E2 - The17thDoctor - 27-02-2021 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. RE: Hiding chat in E2 - mariofludd - 27-02-2021 The point is that this only hides from chat. I'm trying to hide it from Starfall So this doesn't help at all. RE: Hiding chat in E2 - TheEnigma - 27-02-2021 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). |