• Print

Author Topic: TTT - TeamChat!  (Read 5235 times)

0 Members and 1 Guest are viewing this topic.

Offline Sh4dow

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
TTT - TeamChat!
« on: March 08, 2018, 12:09:47 pm »
Hello, from one player i heard that, when he was playing on the other server as Innocent when he tried to type something on Teamchat he saw message: "You can't use teamchat as Innocent". I think it's a pretty good idea, and i though maybe you can help me with doing that?

Offline BlueNova

  • Full Member
  • ***
  • Posts: 113
  • Karma: 13
  • The most powerful force in the universe.
Re: TTT - TeamChat!
« Reply #1 on: March 09, 2018, 10:42:07 am »
OnPlayerChat Hook
PlayerSay Hook

Those two hooks may be able to help you. Not too familiar with team chats but something like this could be done...

Code: Lua
  1. hook.Add("PlayerSay", "NoTeamChat", function(ply, text, teamChat)
  2.         if (teamChat) then
  3.                 ply:ChatPrint("No team chat")
  4.                 return false
  5.         end
  6. end)

That may not work entirely but the concept is sorta there.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: TTT - TeamChat!
« Reply #2 on: March 10, 2018, 02:19:27 pm »
What's the point? Teamchat as Innocent sends it to everyone already.

Sent using Tapatalk. Owner of iViscosity Gaming.

I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: TTT - TeamChat!
« Reply #3 on: March 10, 2018, 07:02:03 pm »
What's the point? Teamchat as Innocent sends it to everyone already.
as Innocent when he tried to type something on Teamchat he saw message: "You can't use teamchat as Innocent". I think it's a pretty good idea
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

  • Print