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

[TF2 MvM] Chat Fix


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Theon32
Member
Join Date: Sep 2018
Location: mvm_isolation_rc3
Old 05-13-2019 , 08:23   [TF2 MvM] Chat Fix
Reply With Quote #1

So for some reason my chat on MvM is broken because I can't see the opposing team, but I was being told that it was a default behavior, so I tried making a plugin to fix it, but this issue happens:

I added a command listener for 'say' and while it does work, it doesn't hide any commands that start with '/', and no I don't wanna hide it if it starts with '/', only if it is a valid command.


Here's the code:
PHP Code:
public Action:Chat(client, const char[] commandint argc)
{
    if (
StrEqual(command"say_team") || StrEqual(command"say_party")) {return Plugin_Handled;}
    
int PlayerTeam GetClientTeam(client);
    new 
String:Args[128];
    
GetCmdArgString(Argssizeof(Args));
    
StripQuotes(Args);
    new 
String:cl_name[32];
    
GetClientName(clientcl_namesizeof(cl_name));
    new 
String:spec[8];

    if (
PlayerTeam == 1) {spec "*SPEC* ";}

    
CPrintToChatAllEx(client"%s{teamcolor}%s{default} :  %s"speccl_nameArgs);
    return 
Plugin_Handled;

Theon32 is offline
 



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 10:48.


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