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

Edit score at mix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
miroN
Member
Join Date: Nov 2013
Old 12-07-2014 , 06:13   Edit score at mix
Reply With Quote #1

Hello again , I have in this assembly there are 2 types of score one that shows in hud and another who writes to say each round score ,
I want to score from hud done in /score that is that I could write to say
/score and I discussed the current score

Code:
#include <amxmodx>
#include <cstrike>
#include <ColorChat>
#include <fun>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>

#define MAX_ROUNDS    15
#define TASK        1337
#define ACCESS ADMIN_KICK
#define TIME 30.0
#define ADVERTISING_TIME 80.0


static const

    PLUGIN[ ] =        "NewM1xMoldova",
    VERSION[ ] =          "0.0.1",
    AUTHOR[ ] =          "regizoru",
    TAG[ ] =            "[NewM1xMD]";

stock const messages [ ] [ ] =
{
    "^x04[NewM1xMD]^x01 Va uram:^x04 o joaca cat mai placuta !!",
    "^x04[NewM1xMD]^x01 Skype fondatorului :^x04 vladjkee2012",
    "^x04[NewM1xMD]^x01 Plugin creat de^x04 miroN~"

};
    
//new g_On[ 33 ] = 0;

    
new bool: g_bMixStarted;
new bool: g_bEndRound;
new bool: g_bSecondPart;

new g_iTeroScore, g_iCTScore;
new g_iTeroSScore, g_iCTSScore;

new cvar_msg;
new SyncHud;
new KNIFE = 0;
new paused = 0;
new amx_gamename;

new Float:player_origin[33][3];
new bool:g_bUsersCanChat = true;
new bool:hasdemo[33];
new bool:g_teammate[33]

new cvar_plugin_on
new cvar_status_on

new g_max_players, g_sync_creat_list

public plugin_init( )
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    register_clcmd("say /start", "cmdStart", ADMIN_KICK);
    register_clcmd("say /stop", "cmdStop", ADMIN_KICK);
    register_clcmd("say /warm", "cmdWarm", ADMIN_KICK);
    register_clcmd("say /prelungiri", "cmdExtra", ADMIN_KICK);
    register_clcmd("say /knife", "cmdKnife", ADMIN_KICK);
    register_clcmd("say /spec", "moveSpec", ADMIN_KICK);
    register_clcmd("say /rr", "cmdRestart", ADMIN_KICK);
    register_clcmd("say /bloc", "cmdBlocare", ADMIN_KICK);
    register_clcmd("say /debloc", "cmdDeblocare", ADMIN_KICK);
    register_clcmd("say /comenzi", "cmdComenzi", ADMIN_KICK);
    register_clcmd("say /banii", "clcmd_money");
    register_concmd("amx_t", "admin_chteam", ADMIN_KICK, "<authid, nick or #userid>");
    register_concmd("amx_ct", "admin_chteam", ADMIN_KICK, "<authid, nick or #userid>");
    register_concmd("amx_spec", "admin_chteam", ADMIN_KICK, "<authid, nick or #userid>");
    register_clcmd("say /pause", "cmdPause", ADMIN_KICK);
    register_clcmd("say /unpause", "cmdUnPause", ADMIN_KICK);
    register_clcmd("say_team /start", "cmdStart", ADMIN_KICK);
    register_clcmd("say_team /stop", "cmdStop", ADMIN_KICK);
    register_clcmd("say_team /warm", "cmdWarm", ADMIN_KICK);
    register_clcmd("say_team /prelungiri", "cmdExtra", ADMIN_KICK);
    register_clcmd("say_team /knife", "cmdKnife", ADMIN_KICK);
    register_clcmd("say_team /spec", "moveSpec", ADMIN_KICK);
    register_clcmd("say_team /rr", "cmdRestart", ADMIN_KICK);
    register_clcmd("say_team /bloc", "cmdBlocare", ADMIN_KICK);
    register_clcmd("say_team /debloc", "cmdDeblocare", ADMIN_KICK);
    register_clcmd("say_team /comenzi", "cmdComenzi", ADMIN_KICK);
    register_clcmd("say_team /pause", "cmdPause", ADMIN_KICK);
    register_clcmd("say_team /unpause", "cmdUnPause", ADMIN_KICK);
    register_clcmd("say_team /banii", "clcmd_money");

    
    register_clcmd( "say", "ClCmdSay" );
    register_clcmd( "say", "hookSay" );
    register_clcmd( "say_team", "hookSay" );
    
    RegisterHam(Ham_Spawn, "player", "e_Spawn", 1);
    
    amx_gamename = register_cvar( "amx_gamename", "NewM1xMoldova" );
    
    register_forward( FM_GetGameDescription, "GameDesc" );
    
    register_event("SendAudio", "EventTeroWin", "a", "2&%!MRAD_terwin");
    register_event("SendAudio", "EventCTWin", "a", "2&%!MRAD_ctwin");
    register_event("CurWeapon","switchweapon","be","1=1","2!29");
    
    register_logevent("LogEventRoundEnd", 2, "1=Round_End");
    register_logevent("LogEventRound", 2, "1=Round_End");
    register_logevent("LogEventRoundStart", 2, "1=Round_Start");
    
    set_task ( ADVERTISING_TIME, "show_messages", _, _, _,"b" );
    
    cvar_msg = register_cvar("score_msg", "3");
    cvar_plugin_on = register_cvar("stm_on", "1")
    cvar_status_on = register_cvar("stm_st_on", "1")

    g_max_players = get_maxplayers()
    g_sync_creat_list = CreateHudSyncObj()
    SyncHud = CreateHudSyncObj( );
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

public clcmd_money(client)
{
    if (!get_pcvar_num(cvar_plugin_on))
    {
        client_print(client, print_chat, "")
        return PLUGIN_HANDLED
    }
    show_money(client)
    return PLUGIN_CONTINUE
}

public show_money(client)
{
    static message[1024];
    static name[32];
    
    new money, id, len;
    
    len = format(message, charsmax(message), "Banii financiari ale echipei tale:^n");
    for (id = 1; id <= g_max_players; id++)
    {
        if (id != client && is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
        {
            money = cs_get_user_money(id);
            get_user_name(id, name, 31);
            len += format(message[len], charsmax(message) - len, "%-22.22s: %d^n", name, money);
        }
    }
    set_hudmessage(100, 200, 0, 0.05, 0.35, 0, 0.02, 5.0, 0.1, 0.2, 2);
    ShowSyncHudMsg(client, g_sync_creat_list, message);
}

public client_disconnect(client)
{
    remove_task(client)
}

//=================================================NEWM1XMD COMMANDS===============================================//

public switchweapon(id)
{
    if (KNIFE == 1)
    {
        engclient_cmd(id, "weapon_knife");
    }
}

public cmdRestart(id)
{
    if( !UserHasAcces( id ) )
    {
        ColorChat( id, GREEN, "%s^x01 Nu ai acces la aceasta comanda.", TAG );
        return PLUGIN_HANDLED;
    }
    if( !g_bMixStarted )
    {
        ColorChat(id, GREEN, "%s^x01 Nu poti da restart inainte sa inceapa meciul.", TAG);

        return PLUGIN_HANDLED;
    }
    
    if( g_bSecondPart )
    {
        g_iTeroScore = g_iTeroSScore;
        g_iCTScore = g_iCTSScore;
        KNIFE = 0;
        g_bMixStarted = true;
        new szName[ 32 ];
        get_user_name( id, szName, sizeof ( szName ) -1 );
        
        ColorChat(0, GREEN, "%s^x01 %s a repornit partea a II-a a meciului. Good luck!", TAG, szName);
    }
    
    else if( !g_bSecondPart )
    {
        g_iTeroScore = 0;
        g_iCTScore = 0;
        g_iTeroSScore = 0;
        g_iCTSScore = 0;
        KNIFE = 0;
        g_bMixStarted = true;
        g_bSecondPart = false;
        new szName[ 32 ];
        get_user_name( id, szName, sizeof ( szName ) -1 );
        server_cmd("sv_restart 1");
                server_cmd( "mp_freezetime 10" );
                server_cmd( "mp_buytime 0.25" );
                server_cmd( "mp_startmoney 800" );
                server_cmd( "mp_roundtime 1.75" );
                server_cmd( "mp_forcecamera 2" );
                server_cmd( "mp_friendlyfire 1");
                server_cmd( "mp_c4timer 35");

        ColorChat(0, GREEN, "%s^x01 %s a repornit prima parte a meciului. Good luck!", TAG, szName);
    }
    
    server_cmd("sv_restart 1");
    
    return PLUGIN_HANDLED;
}

public cmdKnife(id)
{
    if( !UserHasAcces( id ) )
    {
        ColorChat( id, GREEN, "%s^x01 Nu ai acces la aceasta comanda.", TAG );
        return PLUGIN_HANDLED;
    }
    if( g_bMixStarted )
    {
        ColorChat(id, GREEN, "%s^x01 Nu poti porni runda de knife in timpul meciului.", TAG);
        
        return PLUGIN_HANDLED;
    }
    KNIFE = 1;
    new szName[ 32 ];
    get_user_name( id, szName, sizeof ( szName ) -1 );
    server_cmd("sv_restart 1");
    server_cmd("exec live.cfg");
    server_cmd("mp_freezetime 0");
    ColorChat(0, GREEN, "%s^x01 %s a pornit runda de knife.", TAG, szName);
    strip_user_weapons(0);
    
    return PLUGIN_HANDLED;
}

public cmdStart(id)
{
    if( !UserHasAcces( id ) )
    {
        ColorChat( id, GREEN, "%s^x01 Nu ai acces la aceasta comanda.", TAG );
        return PLUGIN_HANDLED;
    }
    if( !g_bSecondPart )
    {
        if( g_bMixStarted )
        {
            ColorChat(id, GREEN, "%s^x01 Meciul este deja pornit.", TAG);
            
            return PLUGIN_HANDLED;
        }
        
        g_iTeroScore = 0;
        g_iCTScore = 0;
        g_iTeroSScore = 0;
        g_iCTSScore = 0;
        KNIFE = 0;
        g_bMixStarted = true;
        g_bSecondPart = false;
        new szName[ 32 ];
        get_user_name( id, szName, sizeof ( szName ) -1 );
        taskMSG(TASK);
        
        server_cmd("sv_restart 1");
                server_cmd( "mp_freezetime 10" );
                server_cmd( "mp_buytime 0.25" );
                server_cmd( "mp_startmoney 800" );
                server_cmd( "mp_roundtime 1.75" );
                server_cmd( "mp_forcecamera 2" );
                server_cmd( "mp_friendlyfire 1");
                server_cmd( "mp_c4timer 35");

        
        ColorChat(0, GREEN, "%s^x01 %s a pornit prima parte a meciului. Good luck! HF HF HF HF !!", TAG, szName);
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
    }
    
    else if( g_bSecondPart )
    {
        KNIFE = 0;
        g_bMixStarted = true;
        new szName[ 32 ];
        get_user_name( id, szName, sizeof ( szName ) -1 );
                server_cmd("sv_restart 1");
                server_cmd( "mp_freezetime 10" );
                server_cmd( "mp_buytime 0.25" );
                server_cmd( "mp_startmoney 800" );
                server_cmd( "mp_roundtime 1.75" );
                server_cmd( "mp_forcecamera 2" );
                server_cmd( "mp_friendlyfire 1");
                server_cmd( "mp_c4timer 35");

        
        ColorChat(0, GREEN, "%s^x01 %s a pornit a II-a parte a meciului. Good luck! HF HF HF HF !!", TAG, szName);
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
    }
    
    return PLUGIN_HANDLED;
}

public cmdWarm(id)
{
    if( !UserHasAcces( id ) )
    {
        ColorChat( id, GREEN, "%s^x01 Nu ai acces la aceasta comanda.", TAG );
        return PLUGIN_HANDLED;
    }
    if( g_bMixStarted )
    {
        ColorChat(id, GREEN, "%s^x01 Nu poti da warm in timpul meciului.", TAG);
        
        return PLUGIN_HANDLED;
    }
    
    g_iTeroScore = 0;
    g_iCTScore = 0;
    KNIFE = 0;
    g_bMixStarted = false;
    g_bSecondPart = false;
    new szName[ 32 ];
    get_user_name( id, szName, sizeof ( szName ) -1 );
    if( task_exists(TASK) )
    {
        remove_task(TASK);
    }
    
    ColorChat(0, GREEN, "%s^x01 %s a pornit runda de warm.", TAG, szName);
    server_cmd("sv_restart 1");
        server_cmd( "mp_freezetime 0" );
        server_cmd( "mp_buytime 0.25" );
        server_cmd( "mp_startmoney 16000" );
        server_cmd( "mp_roundtime 8.75" );
        server_cmd( "mp_forcecamera 2" );
        server_cmd( "mp_friendlyfire 0");
        server_cmd( "mp_c4timer 35");

    
    return PLUGIN_HANDLED;
}

public cmdStop(id)
{
    if( !UserHasAcces( id ) )
    {
        ColorChat( id, GREEN, "%s^x01 Nu ai acces la aceasta comanda.", TAG );
        return PLUGIN_HANDLED;
    }
    if( !g_bMixStarted )
    {
        ColorChat(id, GREEN, "%s^x01 Meciul este deja oprit.", TAG);
        
        return PLUGIN_HANDLED;
    }
    
    g_iTeroScore = 0;
    g_iCTScore = 0;
    g_iTeroSScore = 0;
    g_iCTSScore = 0;
    
    g_bMixStarted = false;
    g_bSecondPart = false;
    new szName[ 32 ];
    get_user_name( id, szName, sizeof ( szName ) -1 );
    if( task_exists(TASK) )
    {
        remove_task(TASK);
    }
    
    ColorChat(0, GREEN, "%s^x01 %s a anulat meciul.", TAG, szName);
        server_cmd("sv_restart 1");
        server_cmd( "mp_freezetime 0" );
        server_cmd( "mp_buytime 0.25" );
        server_cmd( "mp_startmoney 16000" );
        server_cmd( "mp_roundtime 8.75" );
        server_cmd( "mp_forcecamera 2" );
        server_cmd( "mp_friendlyfire 0");
        server_cmd( "mp_c4timer 35");

    return PLUGIN_HANDLED;
}

public EventTeroWin( )
{
    if( g_bMixStarted && !g_bEndRound )
    {
        g_bEndRound = true;
    
        g_iTeroScore++;
    
    }
}

public EventCTWin( )
{
    if( g_bMixStarted && !g_bEndRound )
    {
        g_bEndRound = true;
        
        g_iCTScore++;
  
    }
}

public LogEventRoundStart( )
{
    g_bEndRound = false;
        
}

public LogEventRoundEnd( )
{
    if( g_bMixStarted )
    {
        if( g_iTeroScore + g_iCTScore == MAX_ROUNDS )
        {
            new iPlayers[32], iNum, player;
            
            get_players(iPlayers, iNum, "h");
            
            for( new i = 0; i < iNum; i++ )
            {
                player = iPlayers[i];
                
                if( cs_get_user_team(player) == CS_TEAM_T )
                {
                    cs_set_user_team(player, CS_TEAM_CT);
                }
                
                else if( cs_get_user_team(player) == CS_TEAM_CT )
                {
                    cs_set_user_team(player, CS_TEAM_T);
                }
            }
        server_cmd( "sv_restart 1");
        server_cmd( "mp_freezetime 10" );
        server_cmd( "mp_buytime 0.25" );
        server_cmd( "mp_startmoney 800" );
        server_cmd( "mp_roundtime 1.75" );
        server_cmd( "mp_forcecamera 2" );
        server_cmd( "mp_friendlyfire 0");
        server_cmd( "mp_c4timer 35");
            
            new iAux = g_iTeroScore;
            g_iTeroScore = g_iCTScore;
            g_iCTScore = iAux;
            
            g_iTeroSScore = g_iTeroScore;
            g_iCTSScore = g_iCTScore;
            
            g_bSecondPart = true;
            g_bMixStarted = false;
            
            server_cmd("sv_restart 1");
        }
        
        if( g_iTeroScore >= MAX_ROUNDS + 1 )
        
        {
        
             ColorChat(0, GREEN, "%s^x03 Echipa Tero^x01 a castigat meciul cu^x04  %d^x01 la^x04 %d^x01.", TAG, g_iTeroScore, g_iCTScore);
        server_cmd( "sv_restart 1");
        server_cmd( "mp_freezetime 0" );
        server_cmd( "mp_buytime 0.25" );
        server_cmd( "mp_startmoney 16000" );
        server_cmd( "mp_roundtime 8.75" );
        server_cmd( "mp_forcecamera 2" );
        server_cmd( "mp_friendlyfire 0");
        server_cmd( "mp_c4timer 35");
    if( task_exists(TASK) )
    {
        remove_task(TASK);
    }
            cmdStop(TASK);
            
            return PLUGIN_HANDLED;
        }
        
        else if( g_iCTScore >= MAX_ROUNDS + 1 )
        {
             ColorChat(0, GREEN, "%s^x03 Echipa CT^x01 a castigat meciul cu^x04  %d^x01 la^x04 %d^x01.", TAG, g_iCTScore, g_iTeroScore);
        server_cmd( "sv_restart 1");
        server_cmd( "mp_freezetime 0" );
        server_cmd( "mp_buytime 0.25" );
        server_cmd( "mp_startmoney 16000" );
        server_cmd( "mp_roundtime 8.75" );
        server_cmd( "mp_forcecamera 2" );
        server_cmd( "mp_friendlyfire 0");
        server_cmd( "mp_c4timer 35");    
    if( task_exists(TASK) )
    {
        remove_task(TASK);
    }
            cmdStop(TASK);
            
            return PLUGIN_HANDLED;
        }
            
        else if( g_iTeroScore == MAX_ROUNDS && g_iCTScore == MAX_ROUNDS )
        {
            ColorChat(0, GREEN, "%s^x01 Meciul s-a terminat egal.", TAG);
            ColorChat(0, GREEN, "%s^x01 Pentru prelungiri,scrieti comanda /prelungiri", TAG);
            
            cmdStop(TASK);
            
            return PLUGIN_HANDLED;
        }
        
        if( get_pcvar_num(cvar_msg) != 2 )
        {
             ColorChat(0, GREEN, "%s^x01 Echipa T conduce scorul cu^x04 %d^x01 -  Echipa CT conduce scorul cu^x04 %d^x01 ", TAG, g_iTeroScore,  g_iCTScore);
        }
    }
    
    return PLUGIN_HANDLED;
}

public taskMSG(T_A_S_K)
{
    if( get_pcvar_num(cvar_msg) > 1 )
    {
        set_hudmessage(80, 80, 80, -1.0, 0.03, 0, 0.0, 1.1, 0.0, 0.0, -1);
        ShowSyncHudMsg(0, SyncHud, "Echipa TERO %d - %d Echipa CT", g_iTeroScore, g_iCTScore);
    }
    
    set_task(1.0, "taskMSG", TASK);
}

public moveSpec(id, level, cid)
{
        if (!cmd_access(id, level, cid, 2))
        {
            return PLUGIN_HANDLED;
        }
        if( g_bMixStarted )
        {
        ColorChat(id, GREEN, "%s^x01 Nu poti pune jucatorii Spectator in timpul meciului.", TAG);
        
        return PLUGIN_HANDLED;
        }
        new players[32], total, i;
        get_players(players,total,"h");
        for (i=0; i<total;i++)
        {
            user_kill(players[i], 0);
            cs_set_user_team(players[i], CS_TEAM_SPECTATOR);
        }
        ColorChat(0, GREEN, "%s^x01 Toti jucatori au fost pusi ^x04Spectator ^x01pentru alegeri.", TAG);
        return PLUGIN_HANDLED;
}

//===============================================================================================//
//==================================AFK REPORT=======================================================================//
public e_Spawn(id)
{
    remove_task(id);
    if(is_user_alive(id))
    {
        set_task(0.8, "get_spawn", id);
        set_task(1.0, "show_money", id)
    }
    return HAM_IGNORED;
}

public get_spawn(id)
{
    pev(id, pev_origin, player_origin[id]);
    set_task(TIME, "check_afk", id);
}

public check_afk(id)
{
    if(is_user_alive(id))
    {
        if(same_origin(id))
        {
            new name[33];
            get_user_name(id, name, 32);
            ColorChat(0, GREEN, "%s^x01 Player-ul^x04 %s^x01 a fost raportat ca AFK!", TAG, name);
        }
    }
}

public same_origin(id)
{
    new Float:origin[3];
    pev(id, pev_origin, origin);
    for(new i = 0; i < 3; i++)
        if(origin[i] != player_origin[id][i])
            return 0;
    return 1;
}
//=====================================================================================================================
public LogEventRound( )
{
    new iPlayers[32], iNum, player;
    
    get_players(iPlayers, iNum, "ch");
    
    for( new i = 0; i < iNum; i++ )
    {
        player = iPlayers[i];
    }
}
//===============================================BLOCK CHAT=============================================================
public ClCmdSay( id )
{
    
    static szArgs[ 192 ];
    read_args( szArgs, sizeof ( szArgs ) -1 );
    
    if( !szArgs[ 0 ] )    return PLUGIN_CONTINUE;
    
    if( !g_bUsersCanChat )
    {
        ColorChat( id, GREEN, "%s^x01 Chat-ul este^x04 blocat^x01, folositi functia say_team!", TAG );
    }
        
    return g_bUsersCanChat ? PLUGIN_CONTINUE : PLUGIN_HANDLED;
    
}

public cmdBlocare( id )
{
    if( !UserHasAcces( id ) )
    {
        ColorChat( id, GREEN, "%s^x01 Nu ai acces la aceasta comanda.", TAG );
        return PLUGIN_HANDLED;
    }
    
    if( !g_bUsersCanChat )
    {
        ColorChat( id, GREEN, "%s^x01 Chat-ul este deja^x04 blocat^x01.", TAG );
        return PLUGIN_HANDLED;
    }
    
    new szName[ 32 ];
    get_user_name( id, szName, sizeof ( szName ) -1 );
    
    ColorChat( 0, GREEN, "%s^x01 Chat-ul a fost^x04 blocat^x01 de catre adminul^x04 %s^x01.", TAG, szName );
    
    g_bUsersCanChat = false;
    
    return PLUGIN_CONTINUE;
}


public cmdDeblocare( id )
{
    if( !UserHasAcces( id ) )
    {
        ColorChat( id, GREEN, "%s^x01 Nu ai acces la aceasta comanda.", TAG );
        return PLUGIN_HANDLED;
    }
    
    if( g_bUsersCanChat )
    {
        ColorChat( id, GREEN, "%s^x01 Chat-ul este deja^x04 deblocat^x01.", TAG );
        return PLUGIN_HANDLED;
    }
    
    new szName[ 32 ];
    get_user_name( id, szName, sizeof ( szName ) -1 );
    
    ColorChat( 0, GREEN, "%s^x01 Chat-ul a fost^x04 deblocat^x01 de catre adminul^x04 %s^x01.", TAG, szName );
    
    g_bUsersCanChat = true;
    
    return PLUGIN_CONTINUE;
}

stock bool:UserHasAcces( id )
{
    if( get_user_flags( id ) & ADMIN_KICK )
        return true;
        
    return false;
    
}

public cmdComenzi( id )
{
    if( !UserHasAcces( id ) )
    {
        ColorChat( id, GREEN, "%s^x01 Nu ai acces la aceasta comanda.", TAG );
        return PLUGIN_HANDLED;
    }
        
    client_print( 0, print_console, "=================== Comenzi NewM1XMD ================" );

    client_print( 0, print_console, "/comenzi - Lista comenzilor NewM1XMD" );
    client_print( 0, print_console, "/start - Porneste meciul" );
    client_print( 0, print_console, "/stop - Opreste meciul" );
    client_print( 0, print_console, "/knife - Porneste runda de knife" );
    client_print( 0, print_console, "/bloc - Opreste chat-ul" );
    client_print( 0, print_console, "/debloc - Porneste chat-ul " );
    client_print( 0, print_console, "/setari - Seteaza setari gen interp,rate etc. playerilor" );
    client_print( 0, print_console, "/warm - Porneste warm-up" );
    client_print( 0, print_console, "/rr - Se da restart la runda" );
    client_print( 0, print_console, "/banii - Arata situatia financiara banilor a echipei tale" );
    client_print( 0, print_console, "/demo nick - Porneste demo jucatorului respectiv" );
    client_print( 0, print_console, "/prelungiri - Porneste rundele de prelungiri in caz de egal" );
    client_print( 0, print_console, "/spec- Transferi toti playerii la Spectator" );
 
    client_print( 0, print_console, "----------------------------------------" );
    client_print( 0, print_console, "----Comenzi Amx NewM1xMD: ----" );
    client_print( 0, print_console, "---------------------------------------" );

    client_print( 0, print_console, "amx_ct nume - Transferi player-ul la CT" );
    client_print( 0, print_console, "amx_t nume - Transferi player-ul la T" );
    client_print( 0, print_console, "amx_spec nume - Transferi player-ul la spectatori" );
    client_print( 0, print_console, "====================================================" );
            
    new szName[ 32 ];
    get_user_name( id, szName, sizeof ( szName ) -1 );
    
    
    
    return PLUGIN_CONTINUE;
}

//======================================= Prelungiri =================================================
public cmdExtra(id)
{
    if( !UserHasAcces( id ) )
    {
        ColorChat( id, GREEN, "%s^x01 Nu ai acces la aceasta comanda.", TAG );
        return PLUGIN_HANDLED;
    }
    if( !g_bSecondPart )
    {
        if( g_bMixStarted )
        {
            ColorChat(id, GREEN, "%s^x01 Meciul este deja pornit.", TAG);
            
            return PLUGIN_HANDLED;
        }
        
        g_iTeroScore = 0;
        g_iCTScore = 0;
        g_iTeroSScore = 0;
        g_iCTSScore = 0;
        KNIFE = 0;
        g_bMixStarted = true;
        g_bSecondPart = false;
        new szName[ 32 ];
        get_user_name( id, szName, sizeof ( szName ) -1 );
        taskMSG(TASK);
        
                server_cmd("sv_restart 1");
                server_cmd( "mp_freezetime 10" );
                server_cmd( "mp_buytime 0.25" );
                server_cmd( "mp_startmoney 10000" );
                server_cmd( "mp_roundtime 1.75" );
                server_cmd( "mp_forcecamera 2" );
                server_cmd( "mp_friendlyfire 1");
                server_cmd( "mp_c4timer 35");

        
        ColorChat(0, GREEN, "%s^x01 %s a pornit prima parte a prelungirilor. Good luck! HF HF HF !!!", TAG, szName);
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
    }
    
    else if( g_bSecondPart )
    {
        KNIFE = 0;
        g_bMixStarted = true;
        new szName[ 32 ];
        get_user_name( id, szName, sizeof ( szName ) -1 );
                server_cmd("sv_restart 1");
                server_cmd( "mp_freezetime 10" );
                server_cmd( "mp_buytime 0.25" );
                server_cmd( "mp_startmoney 10000" );
                server_cmd( "mp_roundtime 1.75" );
                server_cmd( "mp_forcecamera 2" );
                server_cmd( "mp_friendlyfire 1");
                server_cmd( "mp_c4timer 35");

        
        ColorChat(0, GREEN, "%s^x01 %s a pornit a II-a parte a prelungirilor. Good luck! HF HF HF !!", TAG, szName);
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
                ColorChat(0, GREEN, "LIVE LIVE LIVE !!! Good luck!");
    }
    
    return PLUGIN_HANDLED;
}
//==========================================DEMO=======================================================
      
new const g_Demoname[] = "DEMO_NEWM1X_MD";


public client_connect(id)
{
    hasdemo[id] = false;

}

public hookSay( id )
{
    new szSaid[ 192 ];
    read_args( szSaid, sizeof( szSaid ) -1 );
    remove_quotes( szSaid );
    
    if( contain( szSaid, "/demo" ) != -1 )
    {
        if( get_user_flags( id ) & ADMIN_KICK )
        {
            new target[ 32 ];
            copy( target, sizeof( target ) -1, szSaid[ 6 ] );
            
            new id2 = cmd_target( id, target, 2 );
            
            if(hasdemo[id2])
            {
                static szName[ 32 ];
                new mapname[32];
                get_user_name( id2, szName, sizeof( szName ) -1 );
                get_mapname(mapname,31);
                ColorChat( id, GREEN, "%s ^x01 Jucatorul %s are deja demo!", TAG, szName );
                return PLUGIN_HANDLED;
            }
            
            if( id2 )
            {
                static szName[ 32 ];
                new mapname[32];
                get_user_name( id2, szName, sizeof( szName ) -1 );
                get_mapname(mapname,31);
                hasdemo[id2] = true;
                
                client_cmd( id2, "record ^"%s-%s^"", g_Demoname, mapname);
                
                ColorChat( id, GREEN, "%s^x01 Ai pornit demo pe jucatorul^x04 %s^x01!", TAG, szName );
            }
            
            else
            {
                console_print( id, "Jucatorul cu acest nick nu este pe server !!!" );
            }
            
            return PLUGIN_HANDLED;
        }
    }
    return PLUGIN_CONTINUE;
}

//========================================TRANSFER===================================================
public admin_chteam(id, level, cid) {
   if (!cmd_access(id, level, cid, 2))
      return PLUGIN_HANDLED;
  
   new cmd[10];
   new arg[32];
   new name[32], name2[32];
  
   read_argv(0,cmd,9);
   read_argv(1,arg,31);
   new player = cmd_target(id,arg,2);
   if (!player) return PLUGIN_HANDLED;
  
   user_kill(player, 1);
   get_user_name(id, name, 31);
   get_user_name(player, name2, 31);
  
   if(cmd[4]=='t')
   {
      cs_set_user_team(player,1);
      ColorChat( 0, GREEN, "%s^x01 Adminul^x04 %s^x01 l-a mutat pe^x04 %s^x01 la^x04 TERO^x01.", TAG, name, name2 );
   }
   if(cmd[4]=='c')
   {
      cs_set_user_team(player,2);
      ColorChat( 0, GREEN, "%s^x01 Adminul^x04 %s^x01 l-a mutat pe^x04 %s^x01 la^x04 CT^x01.", TAG, name, name2 );
   }
   if(cmd[4]=='s')
   {
      cs_set_user_team(player,3);
      ColorChat( 0, GREEN, "%s^x01 Adminul^x04 %s^x01 l-a mutat pe^x04 %s^x01 la^x04 Spectator^x01.", TAG, name, name2 );
   }
   return PLUGIN_HANDLED;
}

//============================================PAUSE & NOPAUSE=========================================
public cmdPause(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED;
if (paused == 0)
{
paused = 1;
server_cmd("amx_pause");
ColorChat( 0, GREEN, "%s^x01 Serverul a fost pus pe pauza va rugam sa asteptati !!", TAG);
}
return PLUGIN_HANDLED;
}
public cmdUnPause(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED;
if (paused == 1)
{
paused = 0;
server_cmd("amx_pause");
ColorChat( 0, GREEN, "%s^x01 Pe server a fost scosa pauza, va uram joc cat mai bun !!", TAG);
}
return PLUGIN_HANDLED;
}

public show_messages ( )
{
    new Buffer[256];
    formatex(Buffer, sizeof Buffer - 1, "^x04%s", messages[random(sizeof messages)]);
    
    new players[32], num, id;
    get_players(players, num);
    
    for(new i = 0 ; i < num ; i++)
    {
        id = players[i];
    
        message_begin(MSG_ONE, get_user_msgid("SayText"), _, id);
        write_byte(id);
        write_string(Buffer);
        message_end();
    }
}
public GameDesc( ) {
static gamename[32];
get_pcvar_string( amx_gamename, gamename, 31 );
forward_return( FMV_STRING, gamename );
return FMRES_SUPERCEDE;
}
there is cod hud message this is

Code:
set_hudmessage(80, 80, 80, -1.0, 0.03, 0, 0.0, 1.1, 0.0, 0.0, -1);
 ShowSyncHudMsg(0, SyncHud, "Echipa TERO %d - %d Echipa CT", g_iTeroScore, g_iCTScore);
miroN is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-07-2014 , 06:38   Re: Edit score at mix
Reply With Quote #2

I can't understand your request.

Last edited by zmd94; 12-07-2014 at 06:38.
zmd94 is offline
miroN
Member
Join Date: Nov 2013
Old 12-07-2014 , 06:42   Re: Edit score at mix
Reply With Quote #3

Quote:
Originally Posted by zmd94 View Post
I can't understand your request.
in this mix i have score but she announced in hud i need to modified them in /score to say understant ?
miroN is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-07-2014 , 06:59   Re: Edit score at mix
Reply With Quote #4

He wants a chat message, not a hud one.
__________________
HamletEagle is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-07-2014 , 07:18   Re: Edit score at mix
Reply With Quote #5

Then, just change this:
PHP Code:
set_hudmessage(808080, -1.00.0300.01.10.00.0, -1);
ShowSyncHudMsg(0SyncHud"Echipa TERO %d - %d Echipa CT"g_iTeroScoreg_iCTScore); 
--->
PHP Code:
client_print(idprint_chat"Echipa TERO %d - %d Echipa CT"g_iTeroScoreg_iCTScore); 
zmd94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-07-2014 , 07:19   Re: Edit score at mix
Reply With Quote #6

Also from what I saw he wants it to be accesed by a chat command.
__________________
HamletEagle is offline
miroN
Member
Join Date: Nov 2013
Old 12-07-2014 , 07:20   Re: Edit score at mix
Reply With Quote #7

i need to write /score
miroN is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-07-2014 , 07:33   Re: Edit score at mix
Reply With Quote #8

Just try below. Now, you can say /score. ;)
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <ColorChat>
#include <fun>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>

#define MAX_ROUNDS    15
#define TASK        1337
#define ACCESS ADMIN_KICK
#define TIME 30.0
#define ADVERTISING_TIME 80.0


static const

    
PLUGIN[ ] =        "NewM1xMoldova",
    
VERSION[ ] =          "0.0.1",
    
AUTHOR[ ] =          "regizoru",
    
TAG[ ] =            "[NewM1xMD]";

stock const messages [ ] [ ] =
{
    
"^x04[NewM1xMD]^x01 Va uram:^x04 o joaca cat mai placuta !!",
    
"^x04[NewM1xMD]^x01 Skype fondatorului :^x04 vladjkee2012",
    
"^x04[NewM1xMD]^x01 Plugin creat de^x04 miroN~"

};
    
//new g_On[ 33 ] = 0;

    
new boolg_bMixStarted;
new 
boolg_bEndRound;
new 
boolg_bSecondPart;

new 
g_iTeroScoreg_iCTScore;
new 
g_iTeroSScoreg_iCTSScore;

new 
cvar_msg;
new 
SyncHud;
new 
KNIFE 0;
new 
paused 0;
new 
amx_gamename;

new 
Float:player_origin[33][3];
new 
bool:g_bUsersCanChat true;
new 
bool:hasdemo[33];
new 
bool:g_teammate[33]

new 
cvar_plugin_on
new cvar_status_on

new g_max_playersg_sync_creat_list

public plugin_init( )
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say /start""cmdStart"ADMIN_KICK);
    
register_clcmd("say /stop""cmdStop"ADMIN_KICK);
    
register_clcmd("say /warm""cmdWarm"ADMIN_KICK);
    
register_clcmd("say /prelungiri""cmdExtra"ADMIN_KICK);
    
register_clcmd("say /knife""cmdKnife"ADMIN_KICK);
    
register_clcmd("say /spec""moveSpec"ADMIN_KICK);
    
register_clcmd("say /rr""cmdRestart"ADMIN_KICK);
    
register_clcmd("say /bloc""cmdBlocare"ADMIN_KICK);
    
register_clcmd("say /debloc""cmdDeblocare"ADMIN_KICK);
    
register_clcmd("say /comenzi""cmdComenzi"ADMIN_KICK);
    
register_clcmd("say /banii""clcmd_money");
    
register_concmd("amx_t""admin_chteam"ADMIN_KICK"<authid, nick or #userid>");
    
register_concmd("amx_ct""admin_chteam"ADMIN_KICK"<authid, nick or #userid>");
    
register_concmd("amx_spec""admin_chteam"ADMIN_KICK"<authid, nick or #userid>");
    
register_clcmd("say /pause""cmdPause"ADMIN_KICK);
    
register_clcmd("say /unpause""cmdUnPause"ADMIN_KICK);
    
register_clcmd("say_team /start""cmdStart"ADMIN_KICK);
    
register_clcmd("say_team /stop""cmdStop"ADMIN_KICK);
    
register_clcmd("say_team /warm""cmdWarm"ADMIN_KICK);
    
register_clcmd("say_team /prelungiri""cmdExtra"ADMIN_KICK);
    
register_clcmd("say_team /knife""cmdKnife"ADMIN_KICK);
    
register_clcmd("say_team /spec""moveSpec"ADMIN_KICK);
    
register_clcmd("say_team /rr""cmdRestart"ADMIN_KICK);
    
register_clcmd("say_team /bloc""cmdBlocare"ADMIN_KICK);
    
register_clcmd("say_team /debloc""cmdDeblocare"ADMIN_KICK);
    
register_clcmd("say_team /comenzi""cmdComenzi"ADMIN_KICK);
    
register_clcmd("say_team /pause""cmdPause"ADMIN_KICK);
    
register_clcmd("say_team /unpause""cmdUnPause"ADMIN_KICK);
    
register_clcmd("say_team /banii""clcmd_money");
    
    
    
register_clcmd("say /score""clcmd_score");
    
register_clcmd("say_team /score""clcmd_score");
    
    
register_clcmd"say""ClCmdSay" );
    
register_clcmd"say""hookSay" );
    
register_clcmd"say_team""hookSay" );
    
    
RegisterHam(Ham_Spawn"player""e_Spawn"1);
    
    
amx_gamename register_cvar"amx_gamename""NewM1xMoldova" );
    
    
register_forwardFM_GetGameDescription"GameDesc" );
    
    
register_event("SendAudio""EventTeroWin""a""2&%!MRAD_terwin");
    
register_event("SendAudio""EventCTWin""a""2&%!MRAD_ctwin");
    
register_event("CurWeapon","switchweapon","be","1=1","2!29");
    
    
register_logevent("LogEventRoundEnd"2"1=Round_End");
    
register_logevent("LogEventRound"2"1=Round_End");
    
register_logevent("LogEventRoundStart"2"1=Round_Start");
    
    
set_task ADVERTISING_TIME"show_messages"___,"b" );
    
    
cvar_msg register_cvar("score_msg""3");
    
cvar_plugin_on register_cvar("stm_on""1")
    
cvar_status_on register_cvar("stm_st_on""1")

    
g_max_players get_maxplayers()
    
g_sync_creat_list CreateHudSyncObj()
    
SyncHud CreateHudSyncObj( );
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

public clcmd_money(client)
{
    if (!
get_pcvar_num(cvar_plugin_on))
    {
        
client_print(clientprint_chat"")
        return 
PLUGIN_HANDLED
    
}
    
show_money(client)
    return 
PLUGIN_CONTINUE
}

public 
show_money(client)
{
    static 
message[1024];
    static 
name[32];
    
    new 
moneyidlen;
    
    
len format(messagecharsmax(message), "Banii financiari ale echipei tale:^n");
    for (
id 1id <= g_max_playersid++)
    {
        if (
id != client && is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
        {
            
money cs_get_user_money(id);
            
get_user_name(idname31);
            
len += format(message[len], charsmax(message) - len"%-22.22s: %d^n"namemoney);
        }
    }
    
set_hudmessage(10020000.050.3500.025.00.10.22);
    
ShowSyncHudMsg(clientg_sync_creat_listmessage);
}

public 
client_disconnect(client)
{
    
remove_task(client)
}

//=================================================NEWM1XMD COMMANDS===============================================//

public clcmd_score(id)
{
    
client_print(idprint_chat"Echipa TERO %d - %d Echipa CT"g_iTeroScoreg_iCTScore);  
}

public 
switchweapon(id)
{
    if (
KNIFE == 1)
    {
        
engclient_cmd(id"weapon_knife");
    }
}

public 
cmdRestart(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( !
g_bMixStarted )
    {
        
ColorChat(idGREEN"%s^x01 Nu poti da restart inainte sa inceapa meciul."TAG);

        return 
PLUGIN_HANDLED;
    }
    
    if( 
g_bSecondPart )
    {
        
g_iTeroScore g_iTeroSScore;
        
g_iCTScore g_iCTSScore;
        
KNIFE 0;
        
g_bMixStarted true;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
        
        
ColorChat(0GREEN"%s^x01 %s a repornit partea a II-a a meciului. Good luck!"TAGszName);
    }
    
    else if( !
g_bSecondPart )
    {
        
g_iTeroScore 0;
        
g_iCTScore 0;
        
g_iTeroSScore 0;
        
g_iCTSScore 0;
        
KNIFE 0;
        
g_bMixStarted true;
        
g_bSecondPart false;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
        
server_cmd("sv_restart 1");
                
server_cmd"mp_freezetime 10" );
                
server_cmd"mp_buytime 0.25" );
                
server_cmd"mp_startmoney 800" );
                
server_cmd"mp_roundtime 1.75" );
                
server_cmd"mp_forcecamera 2" );
                
server_cmd"mp_friendlyfire 1");
                
server_cmd"mp_c4timer 35");

        
ColorChat(0GREEN"%s^x01 %s a repornit prima parte a meciului. Good luck!"TAGszName);
    }
    
    
server_cmd("sv_restart 1");
    
    return 
PLUGIN_HANDLED;
}

public 
cmdKnife(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( 
g_bMixStarted )
    {
        
ColorChat(idGREEN"%s^x01 Nu poti porni runda de knife in timpul meciului."TAG);
        
        return 
PLUGIN_HANDLED;
    }
    
KNIFE 1;
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    
server_cmd("sv_restart 1");
    
server_cmd("exec live.cfg");
    
server_cmd("mp_freezetime 0");
    
ColorChat(0GREEN"%s^x01 %s a pornit runda de knife."TAGszName);
    
strip_user_weapons(0);
    
    return 
PLUGIN_HANDLED;
}

public 
cmdStart(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( !
g_bSecondPart )
    {
        if( 
g_bMixStarted )
        {
            
ColorChat(idGREEN"%s^x01 Meciul este deja pornit."TAG);
            
            return 
PLUGIN_HANDLED;
        }
        
        
g_iTeroScore 0;
        
g_iCTScore 0;
        
g_iTeroSScore 0;
        
g_iCTSScore 0;
        
KNIFE 0;
        
g_bMixStarted true;
        
g_bSecondPart false;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
        
        
server_cmd("sv_restart 1");
                
server_cmd"mp_freezetime 10" );
                
server_cmd"mp_buytime 0.25" );
                
server_cmd"mp_startmoney 800" );
                
server_cmd"mp_roundtime 1.75" );
                
server_cmd"mp_forcecamera 2" );
                
server_cmd"mp_friendlyfire 1");
                
server_cmd"mp_c4timer 35");

        
        
ColorChat(0GREEN"%s^x01 %s a pornit prima parte a meciului. Good luck! HF HF HF HF !!"TAGszName);
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
    }
    
    else if( 
g_bSecondPart )
    {
        
KNIFE 0;
        
g_bMixStarted true;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
                
server_cmd("sv_restart 1");
                
server_cmd"mp_freezetime 10" );
                
server_cmd"mp_buytime 0.25" );
                
server_cmd"mp_startmoney 800" );
                
server_cmd"mp_roundtime 1.75" );
                
server_cmd"mp_forcecamera 2" );
                
server_cmd"mp_friendlyfire 1");
                
server_cmd"mp_c4timer 35");

        
        
ColorChat(0GREEN"%s^x01 %s a pornit a II-a parte a meciului. Good luck! HF HF HF HF !!"TAGszName);
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
    }
    
    return 
PLUGIN_HANDLED;
}

public 
cmdWarm(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( 
g_bMixStarted )
    {
        
ColorChat(idGREEN"%s^x01 Nu poti da warm in timpul meciului."TAG);
        
        return 
PLUGIN_HANDLED;
    }
    
    
g_iTeroScore 0;
    
g_iCTScore 0;
    
KNIFE 0;
    
g_bMixStarted false;
    
g_bSecondPart false;
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    if( 
task_exists(TASK) )
    {
        
remove_task(TASK);
    }
    
    
ColorChat(0GREEN"%s^x01 %s a pornit runda de warm."TAGszName);
    
server_cmd("sv_restart 1");
        
server_cmd"mp_freezetime 0" );
        
server_cmd"mp_buytime 0.25" );
        
server_cmd"mp_startmoney 16000" );
        
server_cmd"mp_roundtime 8.75" );
        
server_cmd"mp_forcecamera 2" );
        
server_cmd"mp_friendlyfire 0");
        
server_cmd"mp_c4timer 35");

    
    return 
PLUGIN_HANDLED;
}

public 
cmdStop(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( !
g_bMixStarted )
    {
        
ColorChat(idGREEN"%s^x01 Meciul este deja oprit."TAG);
        
        return 
PLUGIN_HANDLED;
    }
    
    
g_iTeroScore 0;
    
g_iCTScore 0;
    
g_iTeroSScore 0;
    
g_iCTSScore 0;
    
    
g_bMixStarted false;
    
g_bSecondPart false;
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    if( 
task_exists(TASK) )
    {
        
remove_task(TASK);
    }
    
    
ColorChat(0GREEN"%s^x01 %s a anulat meciul."TAGszName);
        
server_cmd("sv_restart 1");
        
server_cmd"mp_freezetime 0" );
        
server_cmd"mp_buytime 0.25" );
        
server_cmd"mp_startmoney 16000" );
        
server_cmd"mp_roundtime 8.75" );
        
server_cmd"mp_forcecamera 2" );
        
server_cmd"mp_friendlyfire 0");
        
server_cmd"mp_c4timer 35");

    return 
PLUGIN_HANDLED;
}

public 
EventTeroWin( )
{
    if( 
g_bMixStarted && !g_bEndRound )
    {
        
g_bEndRound true;
    
        
g_iTeroScore++;
    
    }
}

public 
EventCTWin( )
{
    if( 
g_bMixStarted && !g_bEndRound )
    {
        
g_bEndRound true;
        
        
g_iCTScore++;
  
    }
}

public 
LogEventRoundStart( )
{
    
g_bEndRound false;
        
}

public 
LogEventRoundEnd( )
{
    if( 
g_bMixStarted )
    {
        if( 
g_iTeroScore g_iCTScore == MAX_ROUNDS )
        {
            new 
iPlayers[32], iNumplayer;
            
            
get_players(iPlayersiNum"h");
            
            for( new 
0iNumi++ )
            {
                
player iPlayers[i];
                
                if( 
cs_get_user_team(player) == CS_TEAM_T )
                {
                    
cs_set_user_team(playerCS_TEAM_CT);
                }
                
                else if( 
cs_get_user_team(player) == CS_TEAM_CT )
                {
                    
cs_set_user_team(playerCS_TEAM_T);
                }
            }
        
server_cmd"sv_restart 1");
        
server_cmd"mp_freezetime 10" );
        
server_cmd"mp_buytime 0.25" );
        
server_cmd"mp_startmoney 800" );
        
server_cmd"mp_roundtime 1.75" );
        
server_cmd"mp_forcecamera 2" );
        
server_cmd"mp_friendlyfire 0");
        
server_cmd"mp_c4timer 35");
            
            new 
iAux g_iTeroScore;
            
g_iTeroScore g_iCTScore;
            
g_iCTScore iAux;
            
            
g_iTeroSScore g_iTeroScore;
            
g_iCTSScore g_iCTScore;
            
            
g_bSecondPart true;
            
g_bMixStarted false;
            
            
server_cmd("sv_restart 1");
        }
        
        if( 
g_iTeroScore >= MAX_ROUNDS )
        
        {
        
             
ColorChat(0GREEN"%s^x03 Echipa Tero^x01 a castigat meciul cu^x04  %d^x01 la^x04 %d^x01."TAGg_iTeroScoreg_iCTScore);
        
server_cmd"sv_restart 1");
        
server_cmd"mp_freezetime 0" );
        
server_cmd"mp_buytime 0.25" );
        
server_cmd"mp_startmoney 16000" );
        
server_cmd"mp_roundtime 8.75" );
        
server_cmd"mp_forcecamera 2" );
        
server_cmd"mp_friendlyfire 0");
        
server_cmd"mp_c4timer 35");
    if( 
task_exists(TASK) )
    {
        
remove_task(TASK);
    }
            
cmdStop(TASK);
            
            return 
PLUGIN_HANDLED;
        }
        
        else if( 
g_iCTScore >= MAX_ROUNDS )
        {
             
ColorChat(0GREEN"%s^x03 Echipa CT^x01 a castigat meciul cu^x04  %d^x01 la^x04 %d^x01."TAGg_iCTScoreg_iTeroScore);
        
server_cmd"sv_restart 1");
        
server_cmd"mp_freezetime 0" );
        
server_cmd"mp_buytime 0.25" );
        
server_cmd"mp_startmoney 16000" );
        
server_cmd"mp_roundtime 8.75" );
        
server_cmd"mp_forcecamera 2" );
        
server_cmd"mp_friendlyfire 0");
        
server_cmd"mp_c4timer 35");    
    if( 
task_exists(TASK) )
    {
        
remove_task(TASK);
    }
            
cmdStop(TASK);
            
            return 
PLUGIN_HANDLED;
        }
            
        else if( 
g_iTeroScore == MAX_ROUNDS && g_iCTScore == MAX_ROUNDS )
        {
            
ColorChat(0GREEN"%s^x01 Meciul s-a terminat egal."TAG);
            
ColorChat(0GREEN"%s^x01 Pentru prelungiri,scrieti comanda /prelungiri"TAG);
            
            
cmdStop(TASK);
            
            return 
PLUGIN_HANDLED;
        }
        
        if( 
get_pcvar_num(cvar_msg) != )
        {
             
ColorChat(0GREEN"%s^x01 Echipa T conduce scorul cu^x04 %d^x01 -  Echipa CT conduce scorul cu^x04 %d^x01 "TAGg_iTeroScore,  g_iCTScore);
        }
    }
    
    return 
PLUGIN_HANDLED;
}

public 
moveSpec(idlevelcid)
{
        if (!
cmd_access(idlevelcid2))
        {
            return 
PLUGIN_HANDLED;
        }
        if( 
g_bMixStarted )
        {
        
ColorChat(idGREEN"%s^x01 Nu poti pune jucatorii Spectator in timpul meciului."TAG);
        
        return 
PLUGIN_HANDLED;
        }
        new 
players[32], totali;
        
get_players(players,total,"h");
        for (
i=0i<total;i++)
        {
            
user_kill(players[i], 0);
            
cs_set_user_team(players[i], CS_TEAM_SPECTATOR);
        }
        
ColorChat(0GREEN"%s^x01 Toti jucatori au fost pusi ^x04Spectator ^x01pentru alegeri."TAG);
        return 
PLUGIN_HANDLED;
}

//===============================================================================================//
//==================================AFK REPORT=======================================================================//
public e_Spawn(id)
{
    
remove_task(id);
    if(
is_user_alive(id))
    {
        
set_task(0.8"get_spawn"id);
        
set_task(1.0"show_money"id)
    }
    return 
HAM_IGNORED;
}

public 
get_spawn(id)
{
    
pev(idpev_originplayer_origin[id]);
    
set_task(TIME"check_afk"id);
}

public 
check_afk(id)
{
    if(
is_user_alive(id))
    {
        if(
same_origin(id))
        {
            new 
name[33];
            
get_user_name(idname32);
            
ColorChat(0GREEN"%s^x01 Player-ul^x04 %s^x01 a fost raportat ca AFK!"TAGname);
        }
    }
}

public 
same_origin(id)
{
    new 
Float:origin[3];
    
pev(idpev_originorigin);
    for(new 
03i++)
        if(
origin[i] != player_origin[id][i])
            return 
0;
    return 
1;
}
//=====================================================================================================================
public LogEventRound( )
{
    new 
iPlayers[32], iNumplayer;
    
    
get_players(iPlayersiNum"ch");
    
    for( new 
0iNumi++ )
    {
        
player iPlayers[i];
    }
}
//===============================================BLOCK CHAT=============================================================
public ClCmdSayid )
{
    
    static 
szArgs192 ];
    
read_argsszArgssizeof szArgs ) -);
    
    if( !
szArgs] )    return PLUGIN_CONTINUE;
    
    if( !
g_bUsersCanChat )
    {
        
ColorChatidGREEN"%s^x01 Chat-ul este^x04 blocat^x01, folositi functia say_team!"TAG );
    }
        
    return 
g_bUsersCanChat PLUGIN_CONTINUE PLUGIN_HANDLED;
    
}

public 
cmdBlocareid )
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    
    if( !
g_bUsersCanChat )
    {
        
ColorChatidGREEN"%s^x01 Chat-ul este deja^x04 blocat^x01."TAG );
        return 
PLUGIN_HANDLED;
    }
    
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    
    
ColorChat0GREEN"%s^x01 Chat-ul a fost^x04 blocat^x01 de catre adminul^x04 %s^x01."TAGszName );
    
    
g_bUsersCanChat false;
    
    return 
PLUGIN_CONTINUE;
}


public 
cmdDeblocareid )
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    
    if( 
g_bUsersCanChat )
    {
        
ColorChatidGREEN"%s^x01 Chat-ul este deja^x04 deblocat^x01."TAG );
        return 
PLUGIN_HANDLED;
    }
    
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    
    
ColorChat0GREEN"%s^x01 Chat-ul a fost^x04 deblocat^x01 de catre adminul^x04 %s^x01."TAGszName );
    
    
g_bUsersCanChat true;
    
    return 
PLUGIN_CONTINUE;
}

stock bool:UserHasAccesid )
{
    if( 
get_user_flagsid ) & ADMIN_KICK )
        return 
true;
        
    return 
false;
    
}

public 
cmdComenziid )
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
        
    
client_print0print_console"=================== Comenzi NewM1XMD ================" );

    
client_print0print_console"/comenzi - Lista comenzilor NewM1XMD" );
    
client_print0print_console"/start - Porneste meciul" );
    
client_print0print_console"/stop - Opreste meciul" );
    
client_print0print_console"/knife - Porneste runda de knife" );
    
client_print0print_console"/bloc - Opreste chat-ul" );
    
client_print0print_console"/debloc - Porneste chat-ul " );
    
client_print0print_console"/setari - Seteaza setari gen interp,rate etc. playerilor" );
    
client_print0print_console"/warm - Porneste warm-up" );
    
client_print0print_console"/rr - Se da restart la runda" );
    
client_print0print_console"/banii - Arata situatia financiara banilor a echipei tale" );
    
client_print0print_console"/demo nick - Porneste demo jucatorului respectiv" );
    
client_print0print_console"/prelungiri - Porneste rundele de prelungiri in caz de egal" );
    
client_print0print_console"/spec- Transferi toti playerii la Spectator" );
 
    
client_print0print_console"----------------------------------------" );
    
client_print0print_console"----Comenzi Amx NewM1xMD: ----" );
    
client_print0print_console"---------------------------------------" );

    
client_print0print_console"amx_ct nume - Transferi player-ul la CT" );
    
client_print0print_console"amx_t nume - Transferi player-ul la T" );
    
client_print0print_console"amx_spec nume - Transferi player-ul la spectatori" );
    
client_print0print_console"====================================================" );
            
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    
    
    
    return 
PLUGIN_CONTINUE;
}

//======================================= Prelungiri =================================================
public cmdExtra(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( !
g_bSecondPart )
    {
        if( 
g_bMixStarted )
        {
            
ColorChat(idGREEN"%s^x01 Meciul este deja pornit."TAG);
            
            return 
PLUGIN_HANDLED;
        }
        
        
g_iTeroScore 0;
        
g_iCTScore 0;
        
g_iTeroSScore 0;
        
g_iCTSScore 0;
        
KNIFE 0;
        
g_bMixStarted true;
        
g_bSecondPart false;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
        
                
server_cmd("sv_restart 1");
                
server_cmd"mp_freezetime 10" );
                
server_cmd"mp_buytime 0.25" );
                
server_cmd"mp_startmoney 10000" );
                
server_cmd"mp_roundtime 1.75" );
                
server_cmd"mp_forcecamera 2" );
                
server_cmd"mp_friendlyfire 1");
                
server_cmd"mp_c4timer 35");

        
        
ColorChat(0GREEN"%s^x01 %s a pornit prima parte a prelungirilor. Good luck! HF HF HF !!!"TAGszName);
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
    }
    
    else if( 
g_bSecondPart )
    {
        
KNIFE 0;
        
g_bMixStarted true;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
                
server_cmd("sv_restart 1");
                
server_cmd"mp_freezetime 10" );
                
server_cmd"mp_buytime 0.25" );
                
server_cmd"mp_startmoney 10000" );
                
server_cmd"mp_roundtime 1.75" );
                
server_cmd"mp_forcecamera 2" );
                
server_cmd"mp_friendlyfire 1");
                
server_cmd"mp_c4timer 35");

        
        
ColorChat(0GREEN"%s^x01 %s a pornit a II-a parte a prelungirilor. Good luck! HF HF HF !!"TAGszName);
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
    }
    
    return 
PLUGIN_HANDLED;
}
//==========================================DEMO=======================================================
      
new const g_Demoname[] = "DEMO_NEWM1X_MD";


public 
client_connect(id)
{
    
hasdemo[id] = false;

}

public 
hookSayid )
{
    new 
szSaid192 ];
    
read_argsszSaidsizeofszSaid ) -);
    
remove_quotesszSaid );
    
    if( 
containszSaid"/demo" ) != -)
    {
        if( 
get_user_flagsid ) & ADMIN_KICK )
        {
            new 
target32 ];
            
copytargetsizeoftarget ) -1szSaid] );
            
            new 
id2 cmd_targetidtarget);
            
            if(
hasdemo[id2])
            {
                static 
szName32 ];
                new 
mapname[32];
                
get_user_nameid2szNamesizeofszName ) -);
                
get_mapname(mapname,31);
                
ColorChatidGREEN"%s ^x01 Jucatorul %s are deja demo!"TAGszName );
                return 
PLUGIN_HANDLED;
            }
            
            if( 
id2 )
            {
                static 
szName32 ];
                new 
mapname[32];
                
get_user_nameid2szNamesizeofszName ) -);
                
get_mapname(mapname,31);
                
hasdemo[id2] = true;
                
                
client_cmdid2"record ^"%s-%s^""g_Demonamemapname);
                
                
ColorChatidGREEN"%s^x01 Ai pornit demo pe jucatorul^x04 %s^x01!"TAGszName );
            }
            
            else
            {
                
console_printid"Jucatorul cu acest nick nu este pe server !!!" );
            }
            
            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;
}

//========================================TRANSFER===================================================
public admin_chteam(idlevelcid) {
   if (!
cmd_access(idlevelcid2))
      return 
PLUGIN_HANDLED;
  
   new 
cmd[10];
   new 
arg[32];
   new 
name[32], name2[32];
  
   
read_argv(0,cmd,9);
   
read_argv(1,arg,31);
   new 
player cmd_target(id,arg,2);
   if (!
player) return PLUGIN_HANDLED;
  
   
user_kill(player1);
   
get_user_name(idname31);
   
get_user_name(playername231);
  
   if(
cmd[4]=='t')
   {
      
cs_set_user_team(player,1);
      
ColorChat0GREEN"%s^x01 Adminul^x04 %s^x01 l-a mutat pe^x04 %s^x01 la^x04 TERO^x01."TAGnamename2 );
   }
   if(
cmd[4]=='c')
   {
      
cs_set_user_team(player,2);
      
ColorChat0GREEN"%s^x01 Adminul^x04 %s^x01 l-a mutat pe^x04 %s^x01 la^x04 CT^x01."TAGnamename2 );
   }
   if(
cmd[4]=='s')
   {
      
cs_set_user_team(player,3);
      
ColorChat0GREEN"%s^x01 Adminul^x04 %s^x01 l-a mutat pe^x04 %s^x01 la^x04 Spectator^x01."TAGnamename2 );
   }
   return 
PLUGIN_HANDLED;
}

//============================================PAUSE & NOPAUSE=========================================
public cmdPause(idlevelcid)
{
if (!
cmd_access(idlevelcid2))
return 
PLUGIN_HANDLED;
if (
paused == 0)
{
paused 1;
server_cmd("amx_pause");
ColorChat0GREEN"%s^x01 Serverul a fost pus pe pauza va rugam sa asteptati !!"TAG);
}
return 
PLUGIN_HANDLED;
}
public 
cmdUnPause(idlevelcid)
{
if (!
cmd_access(idlevelcid2))
return 
PLUGIN_HANDLED;
if (
paused == 1)
{
paused 0;
server_cmd("amx_pause");
ColorChat0GREEN"%s^x01 Pe server a fost scosa pauza, va uram joc cat mai bun !!"TAG);
}
return 
PLUGIN_HANDLED;
}

public 
show_messages ( )
{
    new 
Buffer[256];
    
formatex(Buffersizeof Buffer 1"^x04%s"messages[random(sizeof messages)]);
    
    new 
players[32], numid;
    
get_players(playersnum);
    
    for(new 
num i++)
    {
        
id players[i];
    
        
message_begin(MSG_ONEget_user_msgid("SayText"), _id);
        
write_byte(id);
        
write_string(Buffer);
        
message_end();
    }
}
public 
GameDesc( ) {
static 
gamename[32];
get_pcvar_stringamx_gamenamegamename31 );
forward_returnFMV_STRINGgamename );
return 
FMRES_SUPERCEDE;

zmd94 is offline
miroN
Member
Join Date: Nov 2013
Old 12-07-2014 , 07:47   Re: Edit score at mix
Reply With Quote #9

ty you very much topic closed

Last edited by miroN; 12-07-2014 at 08:08.
miroN is offline
miroN
Member
Join Date: Nov 2013
Old 12-07-2014 , 08:16   Re: Edit score at mix
Reply With Quote #10

Quote:
Originally Posted by zmd94 View Post
Just try below. Now, you can say /score. ;)
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <ColorChat>
#include <fun>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>

#define MAX_ROUNDS    15
#define TASK        1337
#define ACCESS ADMIN_KICK
#define TIME 30.0
#define ADVERTISING_TIME 80.0


static const

    
PLUGIN[ ] =        "NewM1xMoldova",
    
VERSION[ ] =          "0.0.1",
    
AUTHOR[ ] =          "regizoru",
    
TAG[ ] =            "[NewM1xMD]";

stock const messages [ ] [ ] =
{
    
"^x04[NewM1xMD]^x01 Va uram:^x04 o joaca cat mai placuta !!",
    
"^x04[NewM1xMD]^x01 Skype fondatorului :^x04 vladjkee2012",
    
"^x04[NewM1xMD]^x01 Plugin creat de^x04 miroN~"

};
    
//new g_On[ 33 ] = 0;

    
new boolg_bMixStarted;
new 
boolg_bEndRound;
new 
boolg_bSecondPart;

new 
g_iTeroScoreg_iCTScore;
new 
g_iTeroSScoreg_iCTSScore;

new 
cvar_msg;
new 
SyncHud;
new 
KNIFE 0;
new 
paused 0;
new 
amx_gamename;

new 
Float:player_origin[33][3];
new 
bool:g_bUsersCanChat true;
new 
bool:hasdemo[33];
new 
bool:g_teammate[33]

new 
cvar_plugin_on
new cvar_status_on

new g_max_playersg_sync_creat_list

public plugin_init( )
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say /start""cmdStart"ADMIN_KICK);
    
register_clcmd("say /stop""cmdStop"ADMIN_KICK);
    
register_clcmd("say /warm""cmdWarm"ADMIN_KICK);
    
register_clcmd("say /prelungiri""cmdExtra"ADMIN_KICK);
    
register_clcmd("say /knife""cmdKnife"ADMIN_KICK);
    
register_clcmd("say /spec""moveSpec"ADMIN_KICK);
    
register_clcmd("say /rr""cmdRestart"ADMIN_KICK);
    
register_clcmd("say /bloc""cmdBlocare"ADMIN_KICK);
    
register_clcmd("say /debloc""cmdDeblocare"ADMIN_KICK);
    
register_clcmd("say /comenzi""cmdComenzi"ADMIN_KICK);
    
register_clcmd("say /banii""clcmd_money");
    
register_concmd("amx_t""admin_chteam"ADMIN_KICK"<authid, nick or #userid>");
    
register_concmd("amx_ct""admin_chteam"ADMIN_KICK"<authid, nick or #userid>");
    
register_concmd("amx_spec""admin_chteam"ADMIN_KICK"<authid, nick or #userid>");
    
register_clcmd("say /pause""cmdPause"ADMIN_KICK);
    
register_clcmd("say /unpause""cmdUnPause"ADMIN_KICK);
    
register_clcmd("say_team /start""cmdStart"ADMIN_KICK);
    
register_clcmd("say_team /stop""cmdStop"ADMIN_KICK);
    
register_clcmd("say_team /warm""cmdWarm"ADMIN_KICK);
    
register_clcmd("say_team /prelungiri""cmdExtra"ADMIN_KICK);
    
register_clcmd("say_team /knife""cmdKnife"ADMIN_KICK);
    
register_clcmd("say_team /spec""moveSpec"ADMIN_KICK);
    
register_clcmd("say_team /rr""cmdRestart"ADMIN_KICK);
    
register_clcmd("say_team /bloc""cmdBlocare"ADMIN_KICK);
    
register_clcmd("say_team /debloc""cmdDeblocare"ADMIN_KICK);
    
register_clcmd("say_team /comenzi""cmdComenzi"ADMIN_KICK);
    
register_clcmd("say_team /pause""cmdPause"ADMIN_KICK);
    
register_clcmd("say_team /unpause""cmdUnPause"ADMIN_KICK);
    
register_clcmd("say_team /banii""clcmd_money");
    
    
    
register_clcmd("say /score""clcmd_score");
    
register_clcmd("say_team /score""clcmd_score");
    
    
register_clcmd"say""ClCmdSay" );
    
register_clcmd"say""hookSay" );
    
register_clcmd"say_team""hookSay" );
    
    
RegisterHam(Ham_Spawn"player""e_Spawn"1);
    
    
amx_gamename register_cvar"amx_gamename""NewM1xMoldova" );
    
    
register_forwardFM_GetGameDescription"GameDesc" );
    
    
register_event("SendAudio""EventTeroWin""a""2&%!MRAD_terwin");
    
register_event("SendAudio""EventCTWin""a""2&%!MRAD_ctwin");
    
register_event("CurWeapon","switchweapon","be","1=1","2!29");
    
    
register_logevent("LogEventRoundEnd"2"1=Round_End");
    
register_logevent("LogEventRound"2"1=Round_End");
    
register_logevent("LogEventRoundStart"2"1=Round_Start");
    
    
set_task ADVERTISING_TIME"show_messages"___,"b" );
    
    
cvar_msg register_cvar("score_msg""3");
    
cvar_plugin_on register_cvar("stm_on""1")
    
cvar_status_on register_cvar("stm_st_on""1")

    
g_max_players get_maxplayers()
    
g_sync_creat_list CreateHudSyncObj()
    
SyncHud CreateHudSyncObj( );
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

public clcmd_money(client)
{
    if (!
get_pcvar_num(cvar_plugin_on))
    {
        
client_print(clientprint_chat"")
        return 
PLUGIN_HANDLED
    
}
    
show_money(client)
    return 
PLUGIN_CONTINUE
}

public 
show_money(client)
{
    static 
message[1024];
    static 
name[32];
    
    new 
moneyidlen;
    
    
len format(messagecharsmax(message), "Banii financiari ale echipei tale:^n");
    for (
id 1id <= g_max_playersid++)
    {
        if (
id != client && is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
        {
            
money cs_get_user_money(id);
            
get_user_name(idname31);
            
len += format(message[len], charsmax(message) - len"%-22.22s: %d^n"namemoney);
        }
    }
    
set_hudmessage(10020000.050.3500.025.00.10.22);
    
ShowSyncHudMsg(clientg_sync_creat_listmessage);
}

public 
client_disconnect(client)
{
    
remove_task(client)
}

//=================================================NEWM1XMD COMMANDS===============================================//

public clcmd_score(id)
{
    
client_print(idprint_chat"Echipa TERO %d - %d Echipa CT"g_iTeroScoreg_iCTScore);  
}

public 
switchweapon(id)
{
    if (
KNIFE == 1)
    {
        
engclient_cmd(id"weapon_knife");
    }
}

public 
cmdRestart(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( !
g_bMixStarted )
    {
        
ColorChat(idGREEN"%s^x01 Nu poti da restart inainte sa inceapa meciul."TAG);

        return 
PLUGIN_HANDLED;
    }
    
    if( 
g_bSecondPart )
    {
        
g_iTeroScore g_iTeroSScore;
        
g_iCTScore g_iCTSScore;
        
KNIFE 0;
        
g_bMixStarted true;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
        
        
ColorChat(0GREEN"%s^x01 %s a repornit partea a II-a a meciului. Good luck!"TAGszName);
    }
    
    else if( !
g_bSecondPart )
    {
        
g_iTeroScore 0;
        
g_iCTScore 0;
        
g_iTeroSScore 0;
        
g_iCTSScore 0;
        
KNIFE 0;
        
g_bMixStarted true;
        
g_bSecondPart false;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
        
server_cmd("sv_restart 1");
                
server_cmd"mp_freezetime 10" );
                
server_cmd"mp_buytime 0.25" );
                
server_cmd"mp_startmoney 800" );
                
server_cmd"mp_roundtime 1.75" );
                
server_cmd"mp_forcecamera 2" );
                
server_cmd"mp_friendlyfire 1");
                
server_cmd"mp_c4timer 35");

        
ColorChat(0GREEN"%s^x01 %s a repornit prima parte a meciului. Good luck!"TAGszName);
    }
    
    
server_cmd("sv_restart 1");
    
    return 
PLUGIN_HANDLED;
}

public 
cmdKnife(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( 
g_bMixStarted )
    {
        
ColorChat(idGREEN"%s^x01 Nu poti porni runda de knife in timpul meciului."TAG);
        
        return 
PLUGIN_HANDLED;
    }
    
KNIFE 1;
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    
server_cmd("sv_restart 1");
    
server_cmd("exec live.cfg");
    
server_cmd("mp_freezetime 0");
    
ColorChat(0GREEN"%s^x01 %s a pornit runda de knife."TAGszName);
    
strip_user_weapons(0);
    
    return 
PLUGIN_HANDLED;
}

public 
cmdStart(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( !
g_bSecondPart )
    {
        if( 
g_bMixStarted )
        {
            
ColorChat(idGREEN"%s^x01 Meciul este deja pornit."TAG);
            
            return 
PLUGIN_HANDLED;
        }
        
        
g_iTeroScore 0;
        
g_iCTScore 0;
        
g_iTeroSScore 0;
        
g_iCTSScore 0;
        
KNIFE 0;
        
g_bMixStarted true;
        
g_bSecondPart false;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
        
        
server_cmd("sv_restart 1");
                
server_cmd"mp_freezetime 10" );
                
server_cmd"mp_buytime 0.25" );
                
server_cmd"mp_startmoney 800" );
                
server_cmd"mp_roundtime 1.75" );
                
server_cmd"mp_forcecamera 2" );
                
server_cmd"mp_friendlyfire 1");
                
server_cmd"mp_c4timer 35");

        
        
ColorChat(0GREEN"%s^x01 %s a pornit prima parte a meciului. Good luck! HF HF HF HF !!"TAGszName);
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
    }
    
    else if( 
g_bSecondPart )
    {
        
KNIFE 0;
        
g_bMixStarted true;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
                
server_cmd("sv_restart 1");
                
server_cmd"mp_freezetime 10" );
                
server_cmd"mp_buytime 0.25" );
                
server_cmd"mp_startmoney 800" );
                
server_cmd"mp_roundtime 1.75" );
                
server_cmd"mp_forcecamera 2" );
                
server_cmd"mp_friendlyfire 1");
                
server_cmd"mp_c4timer 35");

        
        
ColorChat(0GREEN"%s^x01 %s a pornit a II-a parte a meciului. Good luck! HF HF HF HF !!"TAGszName);
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
    }
    
    return 
PLUGIN_HANDLED;
}

public 
cmdWarm(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( 
g_bMixStarted )
    {
        
ColorChat(idGREEN"%s^x01 Nu poti da warm in timpul meciului."TAG);
        
        return 
PLUGIN_HANDLED;
    }
    
    
g_iTeroScore 0;
    
g_iCTScore 0;
    
KNIFE 0;
    
g_bMixStarted false;
    
g_bSecondPart false;
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    if( 
task_exists(TASK) )
    {
        
remove_task(TASK);
    }
    
    
ColorChat(0GREEN"%s^x01 %s a pornit runda de warm."TAGszName);
    
server_cmd("sv_restart 1");
        
server_cmd"mp_freezetime 0" );
        
server_cmd"mp_buytime 0.25" );
        
server_cmd"mp_startmoney 16000" );
        
server_cmd"mp_roundtime 8.75" );
        
server_cmd"mp_forcecamera 2" );
        
server_cmd"mp_friendlyfire 0");
        
server_cmd"mp_c4timer 35");

    
    return 
PLUGIN_HANDLED;
}

public 
cmdStop(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( !
g_bMixStarted )
    {
        
ColorChat(idGREEN"%s^x01 Meciul este deja oprit."TAG);
        
        return 
PLUGIN_HANDLED;
    }
    
    
g_iTeroScore 0;
    
g_iCTScore 0;
    
g_iTeroSScore 0;
    
g_iCTSScore 0;
    
    
g_bMixStarted false;
    
g_bSecondPart false;
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    if( 
task_exists(TASK) )
    {
        
remove_task(TASK);
    }
    
    
ColorChat(0GREEN"%s^x01 %s a anulat meciul."TAGszName);
        
server_cmd("sv_restart 1");
        
server_cmd"mp_freezetime 0" );
        
server_cmd"mp_buytime 0.25" );
        
server_cmd"mp_startmoney 16000" );
        
server_cmd"mp_roundtime 8.75" );
        
server_cmd"mp_forcecamera 2" );
        
server_cmd"mp_friendlyfire 0");
        
server_cmd"mp_c4timer 35");

    return 
PLUGIN_HANDLED;
}

public 
EventTeroWin( )
{
    if( 
g_bMixStarted && !g_bEndRound )
    {
        
g_bEndRound true;
    
        
g_iTeroScore++;
    
    }
}

public 
EventCTWin( )
{
    if( 
g_bMixStarted && !g_bEndRound )
    {
        
g_bEndRound true;
        
        
g_iCTScore++;
  
    }
}

public 
LogEventRoundStart( )
{
    
g_bEndRound false;
        
}

public 
LogEventRoundEnd( )
{
    if( 
g_bMixStarted )
    {
        if( 
g_iTeroScore g_iCTScore == MAX_ROUNDS )
        {
            new 
iPlayers[32], iNumplayer;
            
            
get_players(iPlayersiNum"h");
            
            for( new 
0iNumi++ )
            {
                
player iPlayers[i];
                
                if( 
cs_get_user_team(player) == CS_TEAM_T )
                {
                    
cs_set_user_team(playerCS_TEAM_CT);
                }
                
                else if( 
cs_get_user_team(player) == CS_TEAM_CT )
                {
                    
cs_set_user_team(playerCS_TEAM_T);
                }
            }
        
server_cmd"sv_restart 1");
        
server_cmd"mp_freezetime 10" );
        
server_cmd"mp_buytime 0.25" );
        
server_cmd"mp_startmoney 800" );
        
server_cmd"mp_roundtime 1.75" );
        
server_cmd"mp_forcecamera 2" );
        
server_cmd"mp_friendlyfire 0");
        
server_cmd"mp_c4timer 35");
            
            new 
iAux g_iTeroScore;
            
g_iTeroScore g_iCTScore;
            
g_iCTScore iAux;
            
            
g_iTeroSScore g_iTeroScore;
            
g_iCTSScore g_iCTScore;
            
            
g_bSecondPart true;
            
g_bMixStarted false;
            
            
server_cmd("sv_restart 1");
        }
        
        if( 
g_iTeroScore >= MAX_ROUNDS )
        
        {
        
             
ColorChat(0GREEN"%s^x03 Echipa Tero^x01 a castigat meciul cu^x04  %d^x01 la^x04 %d^x01."TAGg_iTeroScoreg_iCTScore);
        
server_cmd"sv_restart 1");
        
server_cmd"mp_freezetime 0" );
        
server_cmd"mp_buytime 0.25" );
        
server_cmd"mp_startmoney 16000" );
        
server_cmd"mp_roundtime 8.75" );
        
server_cmd"mp_forcecamera 2" );
        
server_cmd"mp_friendlyfire 0");
        
server_cmd"mp_c4timer 35");
    if( 
task_exists(TASK) )
    {
        
remove_task(TASK);
    }
            
cmdStop(TASK);
            
            return 
PLUGIN_HANDLED;
        }
        
        else if( 
g_iCTScore >= MAX_ROUNDS )
        {
             
ColorChat(0GREEN"%s^x03 Echipa CT^x01 a castigat meciul cu^x04  %d^x01 la^x04 %d^x01."TAGg_iCTScoreg_iTeroScore);
        
server_cmd"sv_restart 1");
        
server_cmd"mp_freezetime 0" );
        
server_cmd"mp_buytime 0.25" );
        
server_cmd"mp_startmoney 16000" );
        
server_cmd"mp_roundtime 8.75" );
        
server_cmd"mp_forcecamera 2" );
        
server_cmd"mp_friendlyfire 0");
        
server_cmd"mp_c4timer 35");    
    if( 
task_exists(TASK) )
    {
        
remove_task(TASK);
    }
            
cmdStop(TASK);
            
            return 
PLUGIN_HANDLED;
        }
            
        else if( 
g_iTeroScore == MAX_ROUNDS && g_iCTScore == MAX_ROUNDS )
        {
            
ColorChat(0GREEN"%s^x01 Meciul s-a terminat egal."TAG);
            
ColorChat(0GREEN"%s^x01 Pentru prelungiri,scrieti comanda /prelungiri"TAG);
            
            
cmdStop(TASK);
            
            return 
PLUGIN_HANDLED;
        }
        
        if( 
get_pcvar_num(cvar_msg) != )
        {
             
ColorChat(0GREEN"%s^x01 Echipa T conduce scorul cu^x04 %d^x01 -  Echipa CT conduce scorul cu^x04 %d^x01 "TAGg_iTeroScore,  g_iCTScore);
        }
    }
    
    return 
PLUGIN_HANDLED;
}

public 
moveSpec(idlevelcid)
{
        if (!
cmd_access(idlevelcid2))
        {
            return 
PLUGIN_HANDLED;
        }
        if( 
g_bMixStarted )
        {
        
ColorChat(idGREEN"%s^x01 Nu poti pune jucatorii Spectator in timpul meciului."TAG);
        
        return 
PLUGIN_HANDLED;
        }
        new 
players[32], totali;
        
get_players(players,total,"h");
        for (
i=0i<total;i++)
        {
            
user_kill(players[i], 0);
            
cs_set_user_team(players[i], CS_TEAM_SPECTATOR);
        }
        
ColorChat(0GREEN"%s^x01 Toti jucatori au fost pusi ^x04Spectator ^x01pentru alegeri."TAG);
        return 
PLUGIN_HANDLED;
}

//===============================================================================================//
//==================================AFK REPORT=======================================================================//
public e_Spawn(id)
{
    
remove_task(id);
    if(
is_user_alive(id))
    {
        
set_task(0.8"get_spawn"id);
        
set_task(1.0"show_money"id)
    }
    return 
HAM_IGNORED;
}

public 
get_spawn(id)
{
    
pev(idpev_originplayer_origin[id]);
    
set_task(TIME"check_afk"id);
}

public 
check_afk(id)
{
    if(
is_user_alive(id))
    {
        if(
same_origin(id))
        {
            new 
name[33];
            
get_user_name(idname32);
            
ColorChat(0GREEN"%s^x01 Player-ul^x04 %s^x01 a fost raportat ca AFK!"TAGname);
        }
    }
}

public 
same_origin(id)
{
    new 
Float:origin[3];
    
pev(idpev_originorigin);
    for(new 
03i++)
        if(
origin[i] != player_origin[id][i])
            return 
0;
    return 
1;
}
//=====================================================================================================================
public LogEventRound( )
{
    new 
iPlayers[32], iNumplayer;
    
    
get_players(iPlayersiNum"ch");
    
    for( new 
0iNumi++ )
    {
        
player iPlayers[i];
    }
}
//===============================================BLOCK CHAT=============================================================
public ClCmdSayid )
{
    
    static 
szArgs192 ];
    
read_argsszArgssizeof szArgs ) -);
    
    if( !
szArgs] )    return PLUGIN_CONTINUE;
    
    if( !
g_bUsersCanChat )
    {
        
ColorChatidGREEN"%s^x01 Chat-ul este^x04 blocat^x01, folositi functia say_team!"TAG );
    }
        
    return 
g_bUsersCanChat PLUGIN_CONTINUE PLUGIN_HANDLED;
    
}

public 
cmdBlocareid )
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    
    if( !
g_bUsersCanChat )
    {
        
ColorChatidGREEN"%s^x01 Chat-ul este deja^x04 blocat^x01."TAG );
        return 
PLUGIN_HANDLED;
    }
    
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    
    
ColorChat0GREEN"%s^x01 Chat-ul a fost^x04 blocat^x01 de catre adminul^x04 %s^x01."TAGszName );
    
    
g_bUsersCanChat false;
    
    return 
PLUGIN_CONTINUE;
}


public 
cmdDeblocareid )
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    
    if( 
g_bUsersCanChat )
    {
        
ColorChatidGREEN"%s^x01 Chat-ul este deja^x04 deblocat^x01."TAG );
        return 
PLUGIN_HANDLED;
    }
    
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    
    
ColorChat0GREEN"%s^x01 Chat-ul a fost^x04 deblocat^x01 de catre adminul^x04 %s^x01."TAGszName );
    
    
g_bUsersCanChat true;
    
    return 
PLUGIN_CONTINUE;
}

stock bool:UserHasAccesid )
{
    if( 
get_user_flagsid ) & ADMIN_KICK )
        return 
true;
        
    return 
false;
    
}

public 
cmdComenziid )
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
        
    
client_print0print_console"=================== Comenzi NewM1XMD ================" );

    
client_print0print_console"/comenzi - Lista comenzilor NewM1XMD" );
    
client_print0print_console"/start - Porneste meciul" );
    
client_print0print_console"/stop - Opreste meciul" );
    
client_print0print_console"/knife - Porneste runda de knife" );
    
client_print0print_console"/bloc - Opreste chat-ul" );
    
client_print0print_console"/debloc - Porneste chat-ul " );
    
client_print0print_console"/setari - Seteaza setari gen interp,rate etc. playerilor" );
    
client_print0print_console"/warm - Porneste warm-up" );
    
client_print0print_console"/rr - Se da restart la runda" );
    
client_print0print_console"/banii - Arata situatia financiara banilor a echipei tale" );
    
client_print0print_console"/demo nick - Porneste demo jucatorului respectiv" );
    
client_print0print_console"/prelungiri - Porneste rundele de prelungiri in caz de egal" );
    
client_print0print_console"/spec- Transferi toti playerii la Spectator" );
 
    
client_print0print_console"----------------------------------------" );
    
client_print0print_console"----Comenzi Amx NewM1xMD: ----" );
    
client_print0print_console"---------------------------------------" );

    
client_print0print_console"amx_ct nume - Transferi player-ul la CT" );
    
client_print0print_console"amx_t nume - Transferi player-ul la T" );
    
client_print0print_console"amx_spec nume - Transferi player-ul la spectatori" );
    
client_print0print_console"====================================================" );
            
    new 
szName32 ];
    
get_user_nameidszNamesizeof szName ) -);
    
    
    
    return 
PLUGIN_CONTINUE;
}

//======================================= Prelungiri =================================================
public cmdExtra(id)
{
    if( !
UserHasAccesid ) )
    {
        
ColorChatidGREEN"%s^x01 Nu ai acces la aceasta comanda."TAG );
        return 
PLUGIN_HANDLED;
    }
    if( !
g_bSecondPart )
    {
        if( 
g_bMixStarted )
        {
            
ColorChat(idGREEN"%s^x01 Meciul este deja pornit."TAG);
            
            return 
PLUGIN_HANDLED;
        }
        
        
g_iTeroScore 0;
        
g_iCTScore 0;
        
g_iTeroSScore 0;
        
g_iCTSScore 0;
        
KNIFE 0;
        
g_bMixStarted true;
        
g_bSecondPart false;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
        
                
server_cmd("sv_restart 1");
                
server_cmd"mp_freezetime 10" );
                
server_cmd"mp_buytime 0.25" );
                
server_cmd"mp_startmoney 10000" );
                
server_cmd"mp_roundtime 1.75" );
                
server_cmd"mp_forcecamera 2" );
                
server_cmd"mp_friendlyfire 1");
                
server_cmd"mp_c4timer 35");

        
        
ColorChat(0GREEN"%s^x01 %s a pornit prima parte a prelungirilor. Good luck! HF HF HF !!!"TAGszName);
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
    }
    
    else if( 
g_bSecondPart )
    {
        
KNIFE 0;
        
g_bMixStarted true;
        new 
szName32 ];
        
get_user_nameidszNamesizeof szName ) -);
                
server_cmd("sv_restart 1");
                
server_cmd"mp_freezetime 10" );
                
server_cmd"mp_buytime 0.25" );
                
server_cmd"mp_startmoney 10000" );
                
server_cmd"mp_roundtime 1.75" );
                
server_cmd"mp_forcecamera 2" );
                
server_cmd"mp_friendlyfire 1");
                
server_cmd"mp_c4timer 35");

        
        
ColorChat(0GREEN"%s^x01 %s a pornit a II-a parte a prelungirilor. Good luck! HF HF HF !!"TAGszName);
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
                
ColorChat(0GREEN"LIVE LIVE LIVE !!! Good luck!");
    }
    
    return 
PLUGIN_HANDLED;
}
//==========================================DEMO=======================================================
      
new const g_Demoname[] = "DEMO_NEWM1X_MD";


public 
client_connect(id)
{
    
hasdemo[id] = false;

}

public 
hookSayid )
{
    new 
szSaid192 ];
    
read_argsszSaidsizeofszSaid ) -);
    
remove_quotesszSaid );
    
    if( 
containszSaid"/demo" ) != -)
    {
        if( 
get_user_flagsid ) & ADMIN_KICK )
        {
            new 
target32 ];
            
copytargetsizeoftarget ) -1szSaid] );
            
            new 
id2 cmd_targetidtarget);
            
            if(
hasdemo[id2])
            {
                static 
szName32 ];
                new 
mapname[32];
                
get_user_nameid2szNamesizeofszName ) -);
                
get_mapname(mapname,31);
                
ColorChatidGREEN"%s ^x01 Jucatorul %s are deja demo!"TAGszName );
                return 
PLUGIN_HANDLED;
            }
            
            if( 
id2 )
            {
                static 
szName32 ];
                new 
mapname[32];
                
get_user_nameid2szNamesizeofszName ) -);
                
get_mapname(mapname,31);
                
hasdemo[id2] = true;
                
                
client_cmdid2"record ^"%s-%s^""g_Demonamemapname);
                
                
ColorChatidGREEN"%s^x01 Ai pornit demo pe jucatorul^x04 %s^x01!"TAGszName );
            }
            
            else
            {
                
console_printid"Jucatorul cu acest nick nu este pe server !!!" );
            }
            
            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;
}

//========================================TRANSFER===================================================
public admin_chteam(idlevelcid) {
   if (!
cmd_access(idlevelcid2))
      return 
PLUGIN_HANDLED;
  
   new 
cmd[10];
   new 
arg[32];
   new 
name[32], name2[32];
  
   
read_argv(0,cmd,9);
   
read_argv(1,arg,31);
   new 
player cmd_target(id,arg,2);
   if (!
player) return PLUGIN_HANDLED;
  
   
user_kill(player1);
   
get_user_name(idname31);
   
get_user_name(playername231);
  
   if(
cmd[4]=='t')
   {
      
cs_set_user_team(player,1);
      
ColorChat0GREEN"%s^x01 Adminul^x04 %s^x01 l-a mutat pe^x04 %s^x01 la^x04 TERO^x01."TAGnamename2 );
   }
   if(
cmd[4]=='c')
   {
      
cs_set_user_team(player,2);
      
ColorChat0GREEN"%s^x01 Adminul^x04 %s^x01 l-a mutat pe^x04 %s^x01 la^x04 CT^x01."TAGnamename2 );
   }
   if(
cmd[4]=='s')
   {
      
cs_set_user_team(player,3);
      
ColorChat0GREEN"%s^x01 Adminul^x04 %s^x01 l-a mutat pe^x04 %s^x01 la^x04 Spectator^x01."TAGnamename2 );
   }
   return 
PLUGIN_HANDLED;
}

//============================================PAUSE & NOPAUSE=========================================
public cmdPause(idlevelcid)
{
if (!
cmd_access(idlevelcid2))
return 
PLUGIN_HANDLED;
if (
paused == 0)
{
paused 1;
server_cmd("amx_pause");
ColorChat0GREEN"%s^x01 Serverul a fost pus pe pauza va rugam sa asteptati !!"TAG);
}
return 
PLUGIN_HANDLED;
}
public 
cmdUnPause(idlevelcid)
{
if (!
cmd_access(idlevelcid2))
return 
PLUGIN_HANDLED;
if (
paused == 1)
{
paused 0;
server_cmd("amx_pause");
ColorChat0GREEN"%s^x01 Pe server a fost scosa pauza, va uram joc cat mai bun !!"TAG);
}
return 
PLUGIN_HANDLED;
}

public 
show_messages ( )
{
    new 
Buffer[256];
    
formatex(Buffersizeof Buffer 1"^x04%s"messages[random(sizeof messages)]);
    
    new 
players[32], numid;
    
get_players(playersnum);
    
    for(new 
num i++)
    {
        
id players[i];
    
        
message_begin(MSG_ONEget_user_msgid("SayText"), _id);
        
write_byte(id);
        
write_string(Buffer);
        
message_end();
    }
}
public 
GameDesc( ) {
static 
gamename[32];
get_pcvar_stringamx_gamenamegamename31 );
forward_returnFMV_STRINGgamename );
return 
FMRES_SUPERCEDE;

sir i have a question why this code doesn't work in my mix?
Code:
//===============================================================================================//
//==================================AFK REPORT=======================================================================//
public e_Spawn(id)
{
    remove_task(id);
    if(is_user_alive(id))
    {
        set_task(0.8, "get_spawn", id);
        set_task(1.0, "show_money", id)
    }
    return HAM_IGNORED;
}

public get_spawn(id)
{
    pev(id, pev_origin, player_origin[id]);
    set_task(TIME, "check_afk", id);
}

public check_afk(id)
{
    if(is_user_alive(id))
    {
        if(same_origin(id))
        {
            new name[33];
            get_user_name(id, name, 32);
            ColorChat(0, GREEN, "%s^x01 Player-ul^x04 %s^x01 a fost raportat ca AFK!", TAG, name);
        }
    }
}

public same_origin(id)
{
    new Float:origin[3];
    pev(id, pev_origin, origin);
    for(new i = 0; i < 3; i++)
        if(origin[i] != player_origin[id][i])
            return 0;
    return 1;
}
he don't announce me if player afk ?!
miroN is offline
Reply



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


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