Raised This Month: $51 Target: $400
 12% 

[TF2] Team Talk (team voicechat when alltalk on)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ratty
SourceMod Donor
Join Date: Jan 2006
Plugin ID:
1065
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Lets you talk to just your team when alltalk enabled
    Old 08-03-2009 , 21:01   [TF2] Team Talk (team voicechat when alltalk on)
    Reply With Quote #1

    I run an alltalk server, because the regulars like to chat among themselves, since we like to be social after all. This allows me to have alltalk on, but still be able to chat to just my team when I need to communicate with just my team "spy as sniper! sentry around the corner!".

    I put its for TF2 because I hard coded team 2 and 3, so that spectators could be easily immune.
    If anyone wants to improve on this plugin and use my code, you have my permission! I'm not much of a coder, I just really wanted this done.

    commands:

    +teamtalk - turns on talk to team mode
    -teamtalk - turns off talk to team mode

    Now for the bad news, for people to use it, they need to make some aliases, so this isnt something you can just explain to the pubbers how to do in game.
    If anyone has a way to do it in a single bind, that would be awesome!

    Lets say you want V to be normal talk, and F to only send voice to your team.

    Code:
    alias +teamonly "+teamtalk;+voicerecord"
    alias -teamonly "-teamtalk;-voicerecord"
    
    bind f +teamonly
    bind v +voicerecord
    It plays a short beep of a different pitch when you start and stop talking, so you know its working.

    Alternatively, you can bind a key to be a toggle, then push the normal voice key to talk.

    Code:
    alias teamtalktoggle1 "+teamtalk; alias teamtalktoggle teamtalktoggle2"
    alias teamtalktoggle2 "-teamtalk; alias teamtalktoggle teamtalktoggle1"
    alias teamtalktoggle teamtalktoggle1
    bind f teamtalktoggle
    bind v +voicerecord
    Spectators can talk to and hear everyone always.
    Attached Files
    File Type: sp Get Plugin or Get Source (teamtalk.sp - 2299 views - 1.6 KB)
    __________________
    Visit the NOM NOM NOM community
    http://www.nom-nom-nom.us

    Last edited by berni; 09-11-2009 at 12:04. Reason: Missing plugin description
    ratty is offline
    Atreus
    SourceMod Donor
    Join Date: Apr 2005
    Location: San Diego, CA
    Old 08-04-2009 , 07:59   Re: [TF2] Team Talk (team voicechat when alltalk on)
    Reply With Quote #2

    It's a shame you put in the work to make this when there's already a plugin that does the exact same thing :/ You'd think before putting forth the effort one would search

    http://forums.alliedmods.net/showthread.php?p=772518
    http://forums.alliedmods.net/showthread.php?p=648899

    Last edited by Atreus; 08-04-2009 at 08:02.
    Atreus is offline
    Send a message via AIM to Atreus Send a message via MSN to Atreus
    ratty
    SourceMod Donor
    Join Date: Jan 2006
    Old 08-04-2009 , 19:53   Re: [TF2] Team Talk (team voicechat when alltalk on)
    Reply With Quote #3

    This works differently, on mine alltalk is on by default, and you have to hit another key to do team talk.
    I would say thanks for the tip, but your attitude sucks. Get some manners.
    __________________
    Visit the NOM NOM NOM community
    http://www.nom-nom-nom.us
    ratty is offline
    Atreus
    SourceMod Donor
    Join Date: Apr 2005
    Location: San Diego, CA
    Old 08-04-2009 , 22:51   Re: [TF2] Team Talk (team voicechat when alltalk on)
    Reply With Quote #4

    Quote:
    This works differently, on mine alltalk is on by default, and you have to hit another key to do team talk.
    The plugin listed second supports both methods.
    Quote:
    • sm_alltalk_default <0 or 1>
    Sets whether the default for the client is teamtalk or alltalk
    Quote:
    I would say thanks for the tip, but your attitude sucks. Get some manners.
    Also, my attitude sucks? I'm sorry if you took my words in such a way, but I intended no such thing. If I wanted to offend you, there are many other ways I could have phrased it.

    The post's point was to say it was a shame the effort put into this plugin wasn't able to be put towards something that didn't yet exist, instead.

    Just because a post has proper grammar and spelling and is devoid of smilies does not make it rude, heh.
    Atreus is offline
    Send a message via AIM to Atreus Send a message via MSN to Atreus
    alinayg
    Senior Member
    Join Date: Apr 2009
    Location: USA, RI
    Old 08-05-2009 , 17:22   Re: [TF2] Team Talk (team voicechat when alltalk on)
    Reply With Quote #5

    Can you make it so it does not make the beep?
    __________________
    alinayg is offline
    naris
    AlliedModders Donor
    Join Date: Dec 2006
    Old 08-08-2009 , 14:15   Re: [TF2] Team Talk (team voicechat when alltalk on)
    Reply With Quote #6

    Quote:
    Originally Posted by ratty View Post
    I put its for TF2 because I hard coded team 2 and 3, so that spectators could be easily immune.
    Actually, I think pretty all mods use teams 2 and 3 (CS:S, DOD:S, HL2MP and Insurgency definitely do).
    naris is offline
    Dominator
    Senior Member
    Join Date: Mar 2008
    Old 08-10-2009 , 19:55   Re: [TF2] Team Talk (team voicechat when alltalk on)
    Reply With Quote #7

    Ratty thank you so much for making this plugin.

    We used the use the other one made but players couldn't mute others using tf2's menu and also this was written perfectly for our server's usage.

    again thank you so much, I appreciate your effort!
    __________________
    Dominator is offline
    Jamster
    Veteran Member
    Join Date: Jun 2008
    Old 08-12-2009 , 12:34   Re: [TF2] Team Talk (team voicechat when alltalk on)
    Reply With Quote #8

    This is great and just what I was really wanting recently for all my regs, they'll be very happy with this.

    edit: oh I see that other plugin does work I guess, but I like this because it's just simple and for one job

    Last edited by Jamster; 08-12-2009 at 12:43.
    Jamster is offline
    USSNUKE9
    New Member
    Join Date: Sep 2009
    Old 09-02-2009 , 07:01   Re: [TF2] Team Talk (team voicechat when alltalk on)
    Reply With Quote #9

    I think I may have implemented a toggle, but I haven't tested it yet. Let me know if this looks like it will work, or test it and see if it does. I've also disabled the sounds and replaced them with a chat message that notifies you of your status when toggling.

    You should now be able to bind a key to toggle teamtalk like so:
    Code:
    bind f teamtalk
    Quote:
    Originally Posted by ratty View Post
    If anyone has a way to do it in a single bind, that would be awesome!
    That's what I've tried to do here. The toggle is now a single bind (bind f teamtalk).

    Quote:
    Originally Posted by alinayg View Post
    Can you make it so it does not make the beep?
    This is in my code. Sort of wish this was a convar, but in my version it's simply disabled. In replace is a chat message alerting you of teamtalk status.

    My source below:

    Code:
    #include <sourcemod>
    #include <sdktools>
    #undef REQUIRE_PLUGIN
    
    #define PLUGIN_VERSION "1.0"
    
    new bool:teamtalking = false;
    
    public Plugin:myinfo =
    {
            name = "Team talk",
            author = "Ratty",
            description = "Lets you talk to just your team when alltalk enabled",
            version = PLUGIN_VERSION,
            url = "http://www.nom-nom-nom.us"
    }
    
    public OnPluginStart()
    {
            RegConsoleCmd("+teamtalk", teamtalkon,  "use in conjunction with +voicerecord", FCVAR_GAMEDLL);
            RegConsoleCmd("-teamtalk", teamtalkoff, "use in conjunction with +voicerecord", FCVAR_GAMEDLL);
            RegConsoleCmd("teamtalk", teamtalktoggle, "toggles teamtalk on/off", FCVAR_GAMEDLL);
    }
    
    public Action:teamtalkon(client, args) {
      new myteam = GetClientTeam(client);
            
      teamtalking = true;
        
      switch (myteam) {
        case 2:
          DoTeamTalk(client,3);
        case 3:
          DoTeamTalk(client,2);
        default:
           PrintToChat(client, "You must be on a team to use team chat. Spectators hear and talk to everybody.");
      }
      return Plugin_Handled;
    }
    
    DoTeamTalk(client,team) {
      for (new i = 1; i <= GetMaxClients(); i++) {
        if (IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) == team)
          SetClientListening(i,client,true);
      }
    }
    
    public Action:teamtalkoff(client, args) {
      teamtalking = false;
      for (new i = 1; i <= GetMaxClients(); i++) {
        if (IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i)) {
          SetClientListening(i,client,false);
        }
      }
      
      return Plugin_Handled;
    }
    
    public Action:teamtalktoggle(client, args)
    {
        if (!teamtalking){
            teamtalkon(client, args);
            PrintToChat(client,"\x01\x04[SM] Now talking to team only.")
        }
        else {
            teamtalkoff(client, args);
            PrintToChat(client,"\x01\x04[SM] Now talking to everyone.")
        }
        return;
    }
    Attached Files
    File Type: smx teamtalk.smx (2.7 KB, 652 views)
    File Type: sp Get Plugin or Get Source (teamtalk.sp - 1742 views - 1.9 KB)

    Last edited by USSNUKE9; 09-09-2009 at 05:02.
    USSNUKE9 is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 09-02-2009 , 11:25   Re: [TF2] Team Talk (team voicechat when alltalk on)
    Reply With Quote #10

    Good Plugin man.

    -r3d
    Drixevel is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 04:19.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode