Why is this colored message not displayed, Help me,Thinks

Сообщения
40
Реакции
3
In line 103、104、104,
I don't know how to change it, can you help me, thanks


Код:
// Copyright 2015 Vaqtincha

//*********** Russian Radio Colored Messages ************



#include <amxmodx>

#define print_chat_colored 5

#define ADMIN_TAG "ADMIN"
#define ACCESS_FLAG ADMIN_BAN

new const FITH_TEXT[] = "FIRE_IN_THE_HOLE"
new const RADIO_HE[] = "HEGRENADE"
new const RADIO_SG[] = "SMOKEGRENADE"
new const RADIO_FB[] = "FLASHBANG"

new const RADIO_TAG[] = "RADIO"

// Radio Commands
new const Cover_me[] = "COVER_ME"
new const You_take_the_point[] = "YOU_TAKE_THE_POINT"
new const Hold_this_position[] = "HOLD_THIS_POSITION"
new const Regroup_team[] = "REGROUP_TEAM"
new const Follow_me[] = "FOLLOW_ME"
new const Taking_fire[] = "TAKING_FIRE"

// Group Radio Commands
new const Go_go_go[] = "GO_GO_GO"
new const Team_fall_back[] = "TEAM_FALL_BACK"
new const Stick_together_team[] = "STICK_TOGETHER_TEAM"
new const Get_in_position_and_wait[] = "GET_IN_POSITION_AND_WAIT"
new const Storm_the_front[] = "STORM_THE_FRONT"
new const Report_in_team[] = "REPORT_IN_TEAM"

// Radio Responses/Reports
new const Affirmative[] = "AFFIRMATIVE"
new const Enemy_spotted[] = "ENEMY_SPOTTED"
new const Need_backup[] = "NEED_BACKUP"
new const Sector_clear[] = "SECTOR_CLEAR"
new const In_position[] = "IN_POSITION"
new const Reporting_in[] = "REPORTING_IN"
new const Get_out_of_there[] = "GET_OUT_OF_THERE"
new const Negative[] = "NEGATIVE"
new const Enemy_down[] = "ENEMY_DOWN"

#if defined ADMIN_TAG
new bool:g_bIsUserAdmin[33];
new g_iUserAdminName[33][44];
new g_iUserName[33][32];
#endif
public plugin_init()
{
    register_plugin("Radio Colored Messages", "0.0.2", "Vaqtincha、all85100");
    register_message(get_user_msgid("TextMsg"), "Message_TextMsg");
    register_dictionary("radio_colored_msg.txt")
}

#if defined ADMIN_TAG
public client_putinserver(iPlrId)
{
    get_user_info(iPlrId, "name", g_iUserName[iPlrId], 31);
    g_bIsUserAdmin[iPlrId] = get_user_flags(iPlrId) & ACCESS_FLAG ? true:false;
    formatex(g_iUserAdminName[iPlrId], 43, "%s%s", ADMIN_TAG, g_iUserName[iPlrId]);
}

public client_infochanged(iPlrId)
{
    if (!is_user_connected(iPlrId))
    {
        return PLUGIN_CONTINUE
    }

    get_user_info(iPlrId, "name", g_iUserName[iPlrId], 31);
    g_bIsUserAdmin[iPlrId] = get_user_flags(iPlrId) & ACCESS_FLAG ? true:false;
    formatex(g_iUserAdminName[iPlrId], 43, "%s%s", ADMIN_TAG, g_iUserName[iPlrId]);
    return PLUGIN_CONTINUE
}
#endif
public Message_TextMsg(iMesgId, iMsgType, iPlrId)
{
    if( get_msg_args()!=5 || get_msg_arg_int(1)!=print_chat_colored )
        return PLUGIN_CONTINUE;
    #if defined ADMIN_TAG
    static s_iSenderId;
    #endif
    static s_iMessage[192];
    get_msg_arg_string(3, s_iMessage, 191);
    if( equal(s_iMessage, "#Game_radio") )
    {
        get_msg_arg_string(5, s_iMessage, 191);
        if( equal(s_iMessage, "#Fire_in_the_hole") )
        {
            static s_iSender[4];
            get_msg_arg_string(2, s_iSender, 3);
            #if defined ADMIN_TAG
            switch( get_user_weapon((s_iSenderId=str_to_num(s_iSender))) )
            #else
            switch( get_user_weapon(str_to_num(s_iSender)) )
            #endif
            {
                case CSW_HEGRENADE:    formatex(s_iMessage, 191, "%%s1 ^4%L^1: %L^3%L", iPlrId, RADIO_TAG, iPlrId, FITH_TEXT, iPlrId, RADIO_HE);
                case CSW_SMOKEGRENADE: formatex(s_iMessage, 191, "%%s1 ^4%L^1: %L^3%L", iPlrId, RADIO_TAG, iPlrId, FITH_TEXT, iPlrId, RADIO_SG);
                case CSW_FLASHBANG:    formatex(s_iMessage, 191, "%%s1 ^4%L^1: %L^3%L", iPlrId, RADIO_TAG, iPlrId, FITH_TEXT, iPlrId, RADIO_FB);
                default:               copy(s_iMessage, 191,  "%s1 (РАДИО):  %s2");
            }
        }
        else if( equal(s_iMessage, "#Cover_me") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Cover_me);          
        }
        else if( equal(s_iMessage, "#You_take_the_point") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, You_take_the_point);
        }
        else if( equal(s_iMessage, "#Hold_this_position") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Hold_this_position);
        }      
        else if( equal(s_iMessage, "#Regroup_team") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Regroup_team);
        }      
        else if( equal(s_iMessage, "#Follow_me") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Follow_me);
        }      
        else if( equal(s_iMessage, "#Taking_fire") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Taking_fire);
        }      
        else if( equal(s_iMessage, "#Go_go_go") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Go_go_go);
        }      
        else if( equal(s_iMessage, "#Team_fall_back") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Team_fall_back);
        }      
        else if( equal(s_iMessage, "#Stick_together_team") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Stick_together_team);
        }      
        else if( equal(s_iMessage, "#Get_in_position_and_wait") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Get_in_position_and_wait);
        }      
        else if( equal(s_iMessage, "#Storm_the_front") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Storm_the_front);
        }      
        else if( equal(s_iMessage, "#Report_in_team") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Report_in_team);
        }      
        else if( equal(s_iMessage, "#Affirmative"))
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Affirmative);
        }
        else if( equal(s_iMessage, "#Roger_that"))
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Affirmative);
        }      
        else if( equal(s_iMessage, "#Enemy_spotted") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Enemy_spotted);
        }      
        else if( equal(s_iMessage, "#Need_backup") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Need_backup);
        }      
        else if( equal(s_iMessage, "#Sector_clear") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Sector_clear);
        }      
        else if( equal(s_iMessage, "#In_position") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, In_position);
        }      
        else if( equal(s_iMessage, "#Reporting_in") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Reporting_in);
        }      
        else if( equal(s_iMessage, "#Get_out_of_there") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Get_out_of_there);
        }  
        else if( equal(s_iMessage, "#Negative") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Negative);
        }      
        else if( equal(s_iMessage, "#Enemy_down") )
        {
            formatex(s_iMessage, 191, "^3%%s1 ^4%L^1: %L", iPlrId, RADIO_TAG, iPlrId, Enemy_down);
        }
        set_msg_arg_string(3, s_iMessage);
        #if defined ADMIN_TAG
        static s_iSender[4];
        get_msg_arg_string(2, s_iSender, 3);
        s_iSenderId = str_to_num(s_iSender);
        if( g_bIsUserAdmin[s_iSenderId] )
        {
            if( g_bIsUserAdmin[iPlrId] )
                set_msg_arg_string(4, g_iUserAdminName[s_iSenderId]);
        }
        #endif
    }
    return PLUGIN_CONTINUE;
}
19 Сен 2024
I want to change it to have a color function like this,
 

Download all Attachments

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу