Поиск Ищу плагин score raund color

beni

Пользователь
Регистрация
9 Окт 2017
Сообщения
11
Симпатии
1
Вот такой только для паблика. Заранее спасибо!Screenshot_16.png
 

To be or not to be

Пользователь
Регистрация
9 Июн 2017
Сообщения
1.215
Симпатии
304
beni, можем[DOUBLEPOST=1548172623][/DOUBLEPOST]beni, стоп, а там ведь просто названия поменять (Зомби - Террористы)
 

To be or not to be

Пользователь
Регистрация
9 Июн 2017
Сообщения
1.215
Симпатии
304
beni, покажи код
 

beni

Пользователь
Регистрация
9 Окт 2017
Сообщения
11
Симпатии
1
Код:
#include < amxmodx >
#include < dhudmessage >

#define PLUGIN_NAME "[ZP] DHUD Informer"
#define PLUGIN_VERSION "0.0.0.1"
#define PLUGIN_AUTHOR "Andrei"

enum _: eTeamData
{
    WIN_NO_ONE = 0,
    WIN_ZOMBIES,
    WIN_HUMANS   

}; new g_iWin[ eTeamData ];

public plugin_init()
{
        register_plugin
    (
        PLUGIN_NAME,
        PLUGIN_VERSION,
        PLUGIN_AUTHOR
    );

    register_dictionary( "zp_score.txt" );
    register_message( get_user_msgid( "TextMsg" ), "Message_TextMsg" );
}

public Message_TextMsg( )
{
    static szMessages[ 32 ];
    get_msg_arg_string( 2, szMessages, charsmax( szMessages ) );
    
    if( equal( szMessages, "#Game_will_restart_in" ) )
    {
        g_iWin[ WIN_HUMANS ] = 0;
        g_iWin[ WIN_ZOMBIES ] = 0;
        g_iWin[ WIN_NO_ONE ] = 0;
    }
}

public zp_round_started( )
{
    set_task( 1.0, "Ctask__Update", _ ,_ ,_ , .flags = "b" );
} 

public zp_round_ended( iWinTeam )
{
    switch( iWinTeam )
    {
        case WIN_HUMANS: g_iWin[ WIN_HUMANS ]++;
        case WIN_ZOMBIES: g_iWin[ WIN_ZOMBIES ]++;
        default: g_iWin[ WIN_NO_ONE ]++;
    }

    remove_task();
} 


public Ctask__Update( )
{
    set_dhudmessage( .red = 0, .green = 255, .blue = 0, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "%L                        ", LANG_PLAYER, "SCORE_HUMANS", zp_get_human_count() );
    set_dhudmessage( .red = 100, .green = 100, .blue = 100, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "%L^n%L", LANG_PLAYER, "SCORE_ROUND", ( g_iWin[ WIN_HUMANS ] +  g_iWin[ WIN_ZOMBIES ] + g_iWin[ WIN_NO_ONE ] ), LANG_PLAYER,  "SCORE_WINS", g_iWin[ WIN_HUMANS ],  g_iWin[ WIN_ZOMBIES ] );
    set_dhudmessage( .red = 255, .green = 0, .blue = 0, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "                         %L", LANG_PLAYER, "SCORE_ZOMBIES", zp_get_zombie_count() );
}
 

To be or not to be

Пользователь
Регистрация
9 Июн 2017
Сообщения
1.215
Симпатии
304
beni,
Код:
#include < amxmodx >
#include < dhudmessage >
#include < cstrike >

#define PLUGIN_NAME "[ZP] DHUD Informer"
#define PLUGIN_VERSION "0.0.0.1"
#define PLUGIN_AUTHOR "Andrei"

enum _: eTeamData
{
    WIN_NO_ONE = 0,
    WIN_ZOMBIES,
    WIN_HUMANS   

}; new g_iWin[ eTeamData ];

public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

    register_dictionary( "zp_score.txt" );
    register_message( get_user_msgid( "TextMsg" ), "Message_TextMsg" );
}

public Message_TextMsg( )
{
    static szMessages[ 32 ];
    get_msg_arg_string( 2, szMessages, charsmax( szMessages ) );
    
    if( equal( szMessages, "#Game_will_restart_in" ) )
    {
        g_iWin[ WIN_HUMANS ] = 0;
        g_iWin[ WIN_ZOMBIES ] = 0;
        g_iWin[ WIN_NO_ONE ] = 0;
    }
}

public zp_round_started( )
{
    set_task( 1.0, "Ctask__Update", _ ,_ ,_ , .flags = "b" );
}

public zp_round_ended( iWinTeam )
{
    switch( iWinTeam )
    {
        case WIN_HUMANS: g_iWin[ WIN_HUMANS ]++;
        case WIN_ZOMBIES: g_iWin[ WIN_ZOMBIES ]++;
        default: g_iWin[ WIN_NO_ONE ]++;
    }
    
    remove_task();
}


public Ctask__Update( )
{
    set_dhudmessage( .red = 0, .green = 255, .blue = 0, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "%L                        ", LANG_PLAYER, "SCORE_HUMANS", zp_get_human_count() );
    set_dhudmessage( .red = 100, .green = 100, .blue = 100, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "%L^n%L", LANG_PLAYER, "SCORE_ROUND", ( g_iWin[ WIN_HUMANS ] +  g_iWin[ WIN_ZOMBIES ] + g_iWin[ WIN_NO_ONE ] ), LANG_PLAYER,  "SCORE_WINS", g_iWin[ WIN_HUMANS ],  g_iWin[ WIN_ZOMBIES ] );
    set_dhudmessage( .red = 255, .green = 0, .blue = 0, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "                         %L", LANG_PLAYER, "SCORE_ZOMBIES", zp_get_zombie_count() );
}

zp_get_human_count()
{
    static iHumans, id
    iHumans = 0
    
    for (id = 1; id <= get_maxplayers(); id++)
    {
        if (is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
            iHumans++
    }
    
    return iHumans;
}

zp_get_zombie_count()
{
    static iZombies, id
    iZombies = 0
    
    for (id = 1; id <= get_maxplayers(); id++)
    {
        if (is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
            iZombies++
    }
    
    return iZombies;
}
 

beni

Пользователь
Регистрация
9 Окт 2017
Сообщения
11
Симпатии
1
beni,
Код:
#include < amxmodx >
#include < dhudmessage >
#include < cstrike >

#define PLUGIN_NAME "[ZP] DHUD Informer"
#define PLUGIN_VERSION "0.0.0.1"
#define PLUGIN_AUTHOR "Andrei"

enum _: eTeamData
{
    WIN_NO_ONE = 0,
    WIN_ZOMBIES,
    WIN_HUMANS  

}; new g_iWin[ eTeamData ];

public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

    register_dictionary( "zp_score.txt" );
    register_message( get_user_msgid( "TextMsg" ), "Message_TextMsg" );
}

public Message_TextMsg( )
{
    static szMessages[ 32 ];
    get_msg_arg_string( 2, szMessages, charsmax( szMessages ) );
   
    if( equal( szMessages, "#Game_will_restart_in" ) )
    {
        g_iWin[ WIN_HUMANS ] = 0;
        g_iWin[ WIN_ZOMBIES ] = 0;
        g_iWin[ WIN_NO_ONE ] = 0;
    }
}

public zp_round_started( )
{
    set_task( 1.0, "Ctask__Update", _ ,_ ,_ , .flags = "b" );
}

public zp_round_ended( iWinTeam )
{
    switch( iWinTeam )
    {
        case WIN_HUMANS: g_iWin[ WIN_HUMANS ]++;
        case WIN_ZOMBIES: g_iWin[ WIN_ZOMBIES ]++;
        default: g_iWin[ WIN_NO_ONE ]++;
    }
   
    remove_task();
}


public Ctask__Update( )
{
    set_dhudmessage( .red = 0, .green = 255, .blue = 0, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "%L                        ", LANG_PLAYER, "SCORE_HUMANS", zp_get_human_count() );
    set_dhudmessage( .red = 100, .green = 100, .blue = 100, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "%L^n%L", LANG_PLAYER, "SCORE_ROUND", ( g_iWin[ WIN_HUMANS ] +  g_iWin[ WIN_ZOMBIES ] + g_iWin[ WIN_NO_ONE ] ), LANG_PLAYER,  "SCORE_WINS", g_iWin[ WIN_HUMANS ],  g_iWin[ WIN_ZOMBIES ] );
    set_dhudmessage( .red = 255, .green = 0, .blue = 0, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "                         %L", LANG_PLAYER, "SCORE_ZOMBIES", zp_get_zombie_count() );
}

zp_get_human_count()
{
    static iHumans, id
    iHumans = 0
   
    for (id = 1; id <= get_maxplayers(); id++)
    {
        if (is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
            iHumans++
    }
   
    return iHumans;
}

zp_get_zombie_count()
{
    static iZombies, id
    iZombies = 0
   
    for (id = 1; id <= get_maxplayers(); id++)
    {
        if (is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
            iZombies++
    }
   
    return iZombies;
}
Не работает(
 

To be or not to be

Пользователь
Регистрация
9 Июн 2017
Сообщения
1.215
Симпатии
304
beni,
Код:
#include < amxmodx >
#include < dhudmessage >
#include < cstrike >

#define PLUGIN_NAME "[ZP] DHUD Informer"
#define PLUGIN_VERSION "0.0.0.1"
#define PLUGIN_AUTHOR "Andrei"

enum _: eTeamData
{
    WIN_NO_ONE = 0,
    WIN_ZOMBIES,
    WIN_HUMANS  

}; new g_iWin[ eTeamData ];

public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

    register_dictionary( "zp_score.txt" );
    register_message( get_user_msgid( "TextMsg" ), "Message_TextMsg" );
    set_task( 1.0, "Ctask__Update", _ ,_ ,_ , .flags = "b" );
}

public Message_TextMsg( )
{
    static szMessages[ 32 ];
    get_msg_arg_string( 2, szMessages, charsmax( szMessages ) );
   
    if( equal( szMessages, "#Game_will_restart_in" ) )
    {
        g_iWin[ WIN_HUMANS ] = 0;
        g_iWin[ WIN_ZOMBIES ] = 0;
        g_iWin[ WIN_NO_ONE ] = 0;
    }
}

public zp_round_ended( iWinTeam )
{
    switch( iWinTeam )
    {
        case WIN_HUMANS: g_iWin[ WIN_HUMANS ]++;
        case WIN_ZOMBIES: g_iWin[ WIN_ZOMBIES ]++;
        default: g_iWin[ WIN_NO_ONE ]++;
    }
   
    remove_task();
}


public Ctask__Update( )
{
    set_dhudmessage( .red = 0, .green = 255, .blue = 0, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "%L                        ", LANG_PLAYER, "SCORE_HUMANS", zp_get_human_count() );
    set_dhudmessage( .red = 100, .green = 100, .blue = 100, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "%L^n%L", LANG_PLAYER, "SCORE_ROUND", ( g_iWin[ WIN_HUMANS ] +  g_iWin[ WIN_ZOMBIES ] + g_iWin[ WIN_NO_ONE ] ), LANG_PLAYER,  "SCORE_WINS", g_iWin[ WIN_HUMANS ],  g_iWin[ WIN_ZOMBIES ] );
    set_dhudmessage( .red = 255, .green = 0, .blue = 0, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "                         %L", LANG_PLAYER, "SCORE_ZOMBIES", zp_get_zombie_count() );
}

public zp_get_human_count()
{
    static iHumans, id
    iHumans = 0
   
    for (id = 1; id <= get_maxplayers(); id++)
    {
        if (is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
            iHumans++
    }
   
    return iHumans;
}

public zp_get_zombie_count()
{
    static iZombies, id
    iZombies = 0
   
    for (id = 1; id <= get_maxplayers(); id++)
    {
        if (is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
            iZombies++
    }
   
    return iZombies;
}

ps этот работает
 
  • Мне нравится
Симпатии: beni

beni

Пользователь
Регистрация
9 Окт 2017
Сообщения
11
Симпатии
1
beni,
Код:
#include < amxmodx >
#include < dhudmessage >
#include < cstrike >

#define PLUGIN_NAME "[ZP] DHUD Informer"
#define PLUGIN_VERSION "0.0.0.1"
#define PLUGIN_AUTHOR "Andrei"

enum _: eTeamData
{
    WIN_NO_ONE = 0,
    WIN_ZOMBIES,
    WIN_HUMANS 

}; new g_iWin[ eTeamData ];

public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

    register_dictionary( "zp_score.txt" );
    register_message( get_user_msgid( "TextMsg" ), "Message_TextMsg" );
    set_task( 1.0, "Ctask__Update", _ ,_ ,_ , .flags = "b" );
}

public Message_TextMsg( )
{
    static szMessages[ 32 ];
    get_msg_arg_string( 2, szMessages, charsmax( szMessages ) );
  
    if( equal( szMessages, "#Game_will_restart_in" ) )
    {
        g_iWin[ WIN_HUMANS ] = 0;
        g_iWin[ WIN_ZOMBIES ] = 0;
        g_iWin[ WIN_NO_ONE ] = 0;
    }
}

public zp_round_ended( iWinTeam )
{
    switch( iWinTeam )
    {
        case WIN_HUMANS: g_iWin[ WIN_HUMANS ]++;
        case WIN_ZOMBIES: g_iWin[ WIN_ZOMBIES ]++;
        default: g_iWin[ WIN_NO_ONE ]++;
    }
  
    remove_task();
}


public Ctask__Update( )
{
    set_dhudmessage( .red = 0, .green = 255, .blue = 0, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "%L                        ", LANG_PLAYER, "SCORE_HUMANS", zp_get_human_count() );
    set_dhudmessage( .red = 100, .green = 100, .blue = 100, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "%L^n%L", LANG_PLAYER, "SCORE_ROUND", ( g_iWin[ WIN_HUMANS ] +  g_iWin[ WIN_ZOMBIES ] + g_iWin[ WIN_NO_ONE ] ), LANG_PLAYER,  "SCORE_WINS", g_iWin[ WIN_HUMANS ],  g_iWin[ WIN_ZOMBIES ] );
    set_dhudmessage( .red = 255, .green = 0, .blue = 0, .x = -1.0, .y = 0.02, .effects = 0, .fxtime = 6.0, .holdtime = 2.0, .fadeintime = 1.0, .fadeouttime = 1.0, .reliable = false );
    show_dhudmessage( 0, "                         %L", LANG_PLAYER, "SCORE_ZOMBIES", zp_get_zombie_count() );
}

public zp_get_human_count()
{
    static iHumans, id
    iHumans = 0
  
    for (id = 1; id <= get_maxplayers(); id++)
    {
        if (is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
            iHumans++
    }
  
    return iHumans;
}

public zp_get_zombie_count()
{
    static iZombies, id
    iZombies = 0
  
    for (id = 1; id <= get_maxplayers(); id++)
    {
        if (is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
            iZombies++
    }
  
    return iZombies;
}

ps этот работает
Спасибо тебе большое
 

To be or not to be

Пользователь
Регистрация
9 Июн 2017
Сообщения
1.215
Симпатии
304
Врешь[DOUBLEPOST=1548182957][/DOUBLEPOST]А, понiл.
 
Сверху Снизу