Quote:
Originally Posted by Fuck For Fun
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
|
My request is an AMXX plugin for Counter-Strike 1.6
Thanks anyways
__________________