AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   I have a problem with the chatcolor include (https://forums.alliedmods.net/showthread.php?t=182246)

LeeanAndNeka 04-07-2012 20:28

I have a problem with the chatcolor include
 
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.

Napoleon_be 04-07-2012 20:54

Re: I have a problem with the chatcolor include
 
client_print_color(0, DontChange, txt) wtf?

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


LeeanAndNeka 04-07-2012 20:59

Re: I have a problem with the chatcolor include
 
Can you help me plis? How would it then?

I'm noob :S

Napoleon_be 04-07-2012 22:18

Re: I have a problem with the chatcolor include
 
go to suggestions/requests to get help from people changing your code to yours needs.

kramesa 04-07-2012 23:01

Re: I have a problem with the chatcolor include
 
Quote:

Originally Posted by Napoleon_be (Post 1684099)
go to suggestions/requests to get help from people changing your code to yours needs.

Is already on suggestions/requests


All times are GMT -4. The time now is 09:13.

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