Raised This Month: $ Target: $400
 0% 

Say / Say_Team


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 07-26-2011 , 09:35   Say / Say_Team
Reply With Quote #1

I tried making the message that player writes with the colors and stuff as i like:
PHP Code:
#include <amxmodx>
#include <colorchat>

public plugin_init()
{
    
register_clcmd("say","handle_say")
    
register_clcmd("say_team","handle_sayteam")
}
public 
handle_say(id)
{
    new 
szArg[192]
    new 
name[32]
    
read_args(szArg,charsmax(szArg))
    
get_user_name(id,name,31)
    
remove_quotes(szArg)
    
ColorChat(0,RED,"%s^x04 :^x01 %s.",name,szArg)
}
public 
handle_sayteam(id)
{
    new 
szArg[192]
    
read_args(szArg,charsmax(szArg))
    
remove_quotes(szArg)
    if(
get_user_team(id) == 1)
    {
        new 
players[32], pnumtempid
        new 
szName[32], szTempid[10]; 
        
get_user_name(id,szName,31)
        
get_players(playerspnum"a"); 
        for( new 
ii<pnumi++ ) 
        { 
            
tempid players[i];
            
get_user_name(tempidszName31); 
            
num_to_str(tempidszTempid9);
        } 
        
ColorChat(tempid,RED,"[^x04 Team^x03 ]^x01 %s^x04 :^x01 %s.",szName,szArg)
    }
    if(
get_user_team(id) == 2)
    {
        new 
players[32], pnumtempid
        new 
szName[32], szTempid[10]; 
        
get_user_name(id,szName,31)
        
get_players(playerspnum"a"); 
        for( new 
ii<pnumi++ ) 
        { 
            
tempid players[i];
            
get_user_name(tempidszName31); 
            
num_to_str(tempidszTempid9);
        } 
        
ColorChat(tempid,BLUE,"[^x04 Team^x03 ]^x01 %s^x04 :^x01 %s.",szName,szArg)
    }

but im having problem with the say_team i want it to show the message only for the users team.
Dr7sTyLe is offline
 


Thread Tools
Display Modes

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 01:11.


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