• Print

Author Topic: Getting rid of team chat?  (Read 4807 times)

0 Members and 1 Guest are viewing this topic.

Offline AsaKahn

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Getting rid of team chat?
« on: February 03, 2015, 02:24:45 pm »
Like the subject says is there a way to get rid of team chat?

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: Getting rid of team chat?
« Reply #1 on: February 03, 2015, 04:43:44 pm »
I really never thought about it but im sure there is a way.. why would one want to get rid of it?

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Getting rid of team chat?
« Reply #2 on: February 03, 2015, 04:53:04 pm »
http://wiki.garrysmod.com/page/GM/PlayerSay
There's a boolean value in this returned if the chat is in fact team chat.

Code: Lua
  1. function disable_team_chat(ply, msg, team)
  2.     if team then return false end
  3. end
  4.  
  5. hook.Add("PlayerSay", "disable_team_chat_HOOKUNIQUEID", disable_team_chat)

EDIT: I am a derp. Documentation is magic!
« Last Edit: February 03, 2015, 04:59:55 pm by Bytewave »
bw81@ulysses-forums ~ % whoami
Homepage

Offline AsaKahn

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: Getting rid of team chat?
« Reply #3 on: February 03, 2015, 05:45:06 pm »
Thanks but where would I put the lua file?

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Getting rid of team chat?
« Reply #4 on: February 03, 2015, 05:48:07 pm »
Thanks but where would I put the lua file?
In lua/autorun/server.
bw81@ulysses-forums ~ % whoami
Homepage

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Getting rid of team chat?
« Reply #5 on: February 04, 2015, 09:03:19 am »
You could also just make team chat normal chat if you wanted.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

  • Print