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

I have a problem with the chatcolor include


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LeeanAndNeka
Senior Member
Join Date: Feb 2012
Location: Argentina ♥
Old 04-07-2012 , 20:28   I have a problem with the chatcolor include
Reply With Quote #1

Well.. first of all, sorry for my English.

My plugin isn't work simply and i don't know why :S

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <amxmisc>
#include <chatcolor> 

#define PLUGIN "Textos"
#define VERSION "1.0"
#define AUTHOR "Neka"



public plugin_init() { 
    
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say""message_saytext"


public 
message_saytext(id

    static 
szSay[195], txt[256]  
    
read_args(szSaycharsmax(szSay))  
    
remove_quotes(szSay)  
    if(!
szSay[0])  
        return 
PLUGIN_HANDLED  
      
    
static szNombre[33]  
    
get_user_name(idszNombre32)  
     
    if(
is_user_alive(id))  
    {  
        if(
is_user_admin(id))  
        {  
            if(
get_user_flags(id) & ADMIN_IMMUNITY)  
            
formatex(txtcharsmax(txt), "^4[STAFF] ^3DontChange%s ^3BLUE: ^1%s"szNombreszSay)  
            else if(
get_user_flags(id) & ADMIN_KICK)  
            
formatex(txtcharsmax(txt), "^4[ADMIN] ^3DontChange%s ^3BLUE: ^1%s",  szNombreszSay)  
        }  
        else  
        {  
            
formatex(txtcharsmax(txt), "^3DontChange%s ^3BLUE: ^1%s",  szNombreszSay)  
        }  
    }  
    else if(!
is_user_alive(id))
    { 
        if(
is_user_admin(id))  
        {  
            if(
get_user_flags(id) & ADMIN_IMMUNITY)  
            
formatex(txtcharsmax(txt), "^4[STAFF]^3BLUE MUERTO ^3DontChange%s ^3BLUE: ^1%s"szNombreszSay)  
            else if(
get_user_flags(id) & ADMIN_KICK)  
            
formatex(txtcharsmax(txt), "^4[ADMIN] ^3BLUEMUERTO ^3DontChange%s ^3BLUE: ^1%s",  szNombreszSay)  
        }  
        else  
        {  
            
formatex(txtcharsmax(txt), "^3BLUEMUERTO ^3DontChange%s ^3BLUE: ^1%s",  szNombreszSay)  
        }  
    } 
    else if(
cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
    {
        if(
is_user_admin(id)) 
         {  
             if(
get_user_flags(id) & ADMIN_IMMUNITY)  
             
formatex(txtcharsmax(txt), "^4[STAFF] ^3BLUESPEC ^3DontChange%s ^3BLUE: ^1%s"szNombreszSay)  
             else if(
get_user_flags(id) & ADMIN_KICK)  
             
formatex(txtcharsmax(txt), "^4[ADMIN] ^3BLUESPEC ^3DontChange%s ^3BLUE: ^1%s",  szNombreszSay)  
         }  
         else  
         {  
             
formatex(txtcharsmax(txt), "^3BLUESPEC ^3DontChange%s ^3BLUE: ^1%s",  szNombreszSay)  
         }  
    }
     
      
    
client_print_color(0DontChangetxt)  
    
console_print(idtxt)  
      
    return 
PLUGIN_HANDLED  


From now, thank you very much.
LeeanAndNeka is offline
Send a message via MSN to LeeanAndNeka Send a message via Skype™ to LeeanAndNeka
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-07-2012 , 20:54   Re: I have a problem with the chatcolor include
Reply With Quote #2

client_print_color(0, DontChange, txt) wtf?

You have to print it out and not only formatex. Formatex isn't even necessary here.

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
LeeanAndNeka
Senior Member
Join Date: Feb 2012
Location: Argentina ♥
Old 04-07-2012 , 20:59   Re: I have a problem with the chatcolor include
Reply With Quote #3

Can you help me plis? How would it then?

I'm noob :S

Last edited by LeeanAndNeka; 04-07-2012 at 21:00.
LeeanAndNeka is offline
Send a message via MSN to LeeanAndNeka Send a message via Skype™ to LeeanAndNeka
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-07-2012 , 22:18   Re: I have a problem with the chatcolor include
Reply With Quote #4

go to suggestions/requests to get help from people changing your code to yours needs.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 04-07-2012 , 23:01   Re: I have a problem with the chatcolor include
Reply With Quote #5

Quote:
Originally Posted by Napoleon_be View Post
go to suggestions/requests to get help from people changing your code to yours needs.
Is already on suggestions/requests
__________________
kramesa is offline
Reply


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 06:35.


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