Raised This Month: $ Target: $400
 0% 

[REQ] sound when round is over


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xElior
Junior Member
Join Date: Sep 2013
Old 05-15-2015 , 12:15   Re: [REQ] sound when round is over
Reply With Quote #4

Quote:
Originally Posted by Fuck For Fun View Post
Tell me if that's what your request for:
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"; // change the name XXX to name mp3 (use mp3 became wav)

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 );
//        }
//    }
First of all, thank you very much for your help.
Secondly, I am not quite sure where should I locate the sound.. there is no exact location to place it in your code,
maybe I will put in 'sounds' file?

Quote:
Originally Posted by secondtimesold View Post
My request is an AMXX plugin for Counter-Strike 1.6
Thanks anyways
__________________
Sincerely, Elior

Last edited by xElior; 05-15-2015 at 12:16.
xElior is offline
 



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