• Blocking chat clientside
    14 replies, posted
Is it possible to make it so i can block certain players chat clientside? Like, somehow making it so it doesnt display that message? [editline]01:46PM[/editline] Like, return false on some hook or another...
You can return an empty string in a [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSay]Gamemode.PlayerSay [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] hook, this is servside but it will stop the message coming up for all clients.
Yea, but is it possible clientside?
I don't see why you would need it clientside, but I guess you could return true in a [b][url=wiki.garrysmod.com/?title=Gamemode.OnPlayerChat]Gamemode.OnPlayerChat [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] hook.
That would work? Good. I am making a thing to block players chat that i dont like :D
You could do that serverside.
What if he, you know, doesn't own the servers he likes to block the visibility of others' chat messages on?
[QUOTE=esalaka;20722435]What if he, you know, doesn't own the servers he likes to block the visibility of others' chat messages on?[/QUOTE] Then he would do it clientside. [editline]05:26PM[/editline] But I don't think it will work if the server has SE on anyway.
[QUOTE=MakeR;20722456]Then he would do it clientside. [editline]05:26PM[/editline] But I don't think it will work if the server has SE on anyway.[/QUOTE] How will we ever bypass with SE
[url]http://luabin.foszor.com/code/gamemodes/base/gamemode/player_shd.lua#140[/url] And [b][url=http://wiki.garrysmod.com/?title=Chat.AddText]Chat.AddText [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
I did this before (adding and removing people was done by concommand and I even made it write to a file so it carried across sessions) but it was buggy as all get out and custom chat boxes seemed to break it, not to mention most of the popular servers that aren't RP run scriptenforcer so it's pointless anyway. Might look to see if I still have it and fix it up.
returning true to OnPlayerChat works great. Thanks.
[QUOTE=JIAC;20759252]I did this before (adding and removing people was done by concommand and I even made it write to a file so it carried across sessions) but it was buggy as all get out and custom chat boxes seemed to break it, not to mention most of the popular servers that aren't RP run scriptenforcer so it's pointless anyway. Might look to see if I still have it and fix it up.[/QUOTE] Not really. I don't run scriptenforcer on my server because of the kick crash, I'd assume plenty of others don't as well.
Just block the "se fail" command.
[QUOTE=|FlapJack|;20763123]Not really. I don't run scriptenforcer on my server because of the kick crash, I'd assume plenty of others don't as well.[/QUOTE] You should edit your server.dll, it's a very simple fix. I'll write a module later.
Sorry, you need to Log In to post a reply to this thread.