Raised This Month: $ Target: $400
 0% 

[REQ] sound when round is over


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 05-15-2015 , 10:06   Re: [REQ] sound when round is over
Reply With Quote #2

Tell me if that's what your request:
Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new g_pAutoSound;

new const g_szWinTeam[] = "***/XXX.mp3"; // *** That name of Folder after sound/ + change the name XXX to name mp3

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_logevent( "EventRoundEnd", 2, "1=Round_End" );
    
    g_pAutoSound = register_cvar( "amx_autosound", "1" );
}

public plugin_precache()
{
    precache_sound( g_szWinTeam );
}

public EventRoundEnd()
{
    if (!get_pcvar_num( g_pAutoSound ) ) // dont sure if that will work = I retired two months ago from programming
                return;
        
    client_cmd( 0, "spk ^"%s^"", g_szWinTeam );
}


// if my code wrong that another way

//    new players[ 32 ], pnum;
//    new tCount, ctCount;
//    get_players( players, pnum, "c" );
    
//    for( new i = 0; i < pnum; i++ )
//    {
//        if( !is_user_connected( players[ i ] ) )
//            continue;
        
//        switch( cs_get_user_team( players[ i ] ) )
//        {
//            case CS_TEAM_T: 
//                client_cmd( i, "spk ^"%s^"", g_szWinTeam );
            
//            case CS_TEAM_CT: 
//                client_cmd( i, "spk ^"%s^"", g_szWinTeam );
//        }
//    }

Last edited by Fuck For Fun; 05-15-2015 at 12:31.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
 



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 20:19.


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