Thread: TeamTalk
View Single Post
Mikaeel123
Senior Member
Join Date: Oct 2018
Old 05-14-2020 , 04:30   Re: TeamTalk
Reply With Quote #5

Here You go
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
#include <colorchat>

#define PLUGIN    "Talk"
#define VERSION    "1"
#define AUTHOR    "Thew_ConFIger"
#define ACCESS ADMIN_CVAR

new g_pCvarchname
new g_pCvarNoSay
new block

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_pCvarchname register_cvar("sv_noname""0")
    
register_forward(FM_ClientUserInfoChanged"ClientUserInfoChanged")
    

    
    
register_clcmd("say /t0","talk",ACCESS)
    
register_clcmd("say /t1","ontalk",ACCESS)
    
register_clcmd("say /t2","offtalk",ACCESS)

public 
talk(idlevelcid

    if(
cmd_access(id,levelcid1)) 
    { 
        new 
name[32
        
get_user_info(id"name"name31
        
server_cmd("sv_alltalk 0"); 
        
ColorChat(0BLUE,"%s: /t0",name
    } 
    return 
PLUGIN_HANDLED 

public 
ontalk(idlevelcid

    if(
cmd_access(id,levelcid1)) 
    { 
        new 
name[32
        
get_user_info(id"name"name31
        
server_cmd("sv_alltalk 1"); 
        
ColorChat(0BLUE,"%s: /t1",name
    } 
    return 
PLUGIN_HANDLED 

public 
offtalk(idlevelcid

    if(
cmd_access(id,levelcid1)) 
    { 
        new 
name[32
        
get_user_info(id"name"name31
        
server_cmd("sv_alltalk 2"); 
        
ColorChat(0BLUE,"%s: /t2",name
    } 
    return 
PLUGIN_HANDLED 

and this for /knf
https://forums.alliedmods.net/showthread.php?t=106338
Mikaeel123 is offline