segunda-feira, 5 de novembro de 2007

Colocando Sons no fim de cada round

1° Passo:

Primeiro Baixem o Mattie Eventscript 1.50.171 no link abaixo:

http://www.baixa.la/arquivo.php?id=6662244

descompacte na pasta cstrike, abra o autoexec.cfg e adicione as seguintes linhas:

QUOTE
eventscripts_subdirectory events
mattie_eventscripts 1


Pronto vc agora tem o Mattie event scripts 1.5 instalado e ativado no seu mani.

2º Passo:

criem a seguinte pasta (vc deve mudar o caminho conforme sua instalação do CSS):

cstrike\sound\map_sounds

e ponha dentro dela os sons que vc desejar

Agora crie a seguinte pasta (vc deve mudar o caminho conforme sua instalação do CSS:

cstrike\addons\eventscripts\map_sounds

abra o bloco de notas e cole o seguinte codigo nele: depois salve como es_map_sounds.txt

CODE
// End of round/map sounds
// by cagemonkey
// cstrike/addons/eventscripts/map_sounds/es_map_sounds.txt
//
// Requires ES v1.3+
// uses corelib score command in round_end & server_cvar

block load
{
// User config section
//
// END OF ROUND SOUNDS
// If you do not want a custom sound for a specific event, then leave it empty (set it as "")
// Place your custom sounds in /cstrike/sound/map_sounds/ directory.
// Sound names must NOT contain spaces or special characters!!
//
// Round Draw
//es_xsetinfo cgs_round_draw "mk4-awwbaby.wav"
//
// Game Commencing
//es_xsetinfo cgs_game_start "mk4-excellent.wav"
//
// CTs Win
es_xsetinfo cgs_cts_win "ctwin8.mp3"
//
// Terrorists Win
es_xsetinfo cgs_ts_win "twin7.mp3"
//
// Target Bombed
es_xsetinfo cgs_bombed "twin2.mp3"
//
// Bomb Defused
es_xsetinfo cgs_defused "ctwin2.mp3"
//
// Target Saved
//es_xsetinfo cgs_saved "mk4-supurb.wav"
//
// All hostages rescued
es_xsetinfo cgs_hostages_rescued "ctwin8.mp3"
//
// Hostages Not Rescued
es_xsetinfo cgs_hostages_not_rescued "twin7.mp3"
//
////////////////////////////////////////////////////////
// END OF MAP SONGLIST
// Place your songs in /cstrike/sound/map_sounds/ directory!
// Song names must be separated by commas, NO SPACES!!
//es_xsetinfo cgs_songlist "bombtrack.mp3,wakeup.mp3,stand_alone.mp3,matrixwin1.mp3,clickboom.mp3,dontst
ay.mp3,numb.mp3"

//---> END OF USER CONFIG <---// //Init vars es_xsetinfo cgs_starttime 0 es_xsetinfo cgs_currenttime 0 es_xsetinfo cgs_timeleft 0 es_xsetinfo cgs_t_score 0 es_xsetinfo cgs_ct_score 0 es_xsetinfo cgs_tmp 0 es_xsetinfo cgs_sound_winner 0 es_xsetinfo cgs_tmp_sound 0 es_xsetinfo cgs_songs 0 es_token cgs_songs server_var(cgs_songlist) 0 , //Format round sounds es_format cgs_round_draw "map_sounds/%1" server_var(cgs_round_draw) es_format cgs_game_start "map_sounds/%1" server_var(cgs_game_start) es_format cgs_cts_win "map_sounds/%1" server_var(cgs_cts_win) es_format cgs_ts_win "map_sounds/%1" server_var(cgs_ts_win) es_format cgs_bombed "map_sounds/%1" server_var(cgs_bombed) es_format cgs_defused "map_sounds/%1" server_var(cgs_defused) es_format cgs_saved "map_sounds/%1" server_var(cgs_saved) es_format cgs_hostages_rescued "map_sounds/%1" server_var(cgs_hostages_rescued) es_format cgs_hostages_not_rescued "map_sounds/%1" server_var(cgs_hostages_not_rescued) } event es_map_start { //Setup sounds // End of map song es_xsetinfo cgs_tmp_sound 0 es_rand cgs_tmp 1 server_var(cgs_songs) es_token cgs_tmp_sound server_var(cgs_songlist) server_var(cgs_tmp) , es_format cgs_sound_winner "map_sounds/%1" server_var(cgs_tmp_sound) es_format cgs_tmp_sound "sound/%1" server_var(cgs_sound_winner) es_stringtable downloadables server_var(cgs_tmp_sound) // Round draw if (server_var(cgs_round_draw) != 0) do { es_format cgs_tmp_sound "sound/%1" server_var(cgs_round_draw) es_stringtable downloadables server_var(cgs_tmp_sound) } // Game commencing if (server_var(cgs_game_start) != 0) do { es_format cgs_tmp_sound "sound/%1" server_var(cgs_game_start) es_stringtable downloadables server_var(cgs_tmp_sound) } // CTs win if (server_var(cgs_cts_win) != 0) do { es_format cgs_tmp_sound "sound/%1" server_var(cgs_cts_win) es_stringtable downloadables server_var(cgs_tmp_sound) } // Terrorists win if (server_var(cgs_ts_win) != 0) do { es_format cgs_tmp_sound "sound/%1" server_var(cgs_ts_win) es_stringtable downloadables server_var(cgs_tmp_sound) } // Target bombed if (server_var(cgs_bombed) != 0) do { es_format cgs_tmp_sound "sound/%1" server_var(cgs_bombed) es_stringtable downloadables server_var(cgs_tmp_sound) } // Bomb defused if (server_var(cgs_defused) != 0) do { es_format cgs_tmp_sound "sound/%1" server_var(cgs_defused) es_stringtable downloadables server_var(cgs_tmp_sound) } // Target saved if (server_var(cgs_saved) != 0) do { es_format cgs_tmp_sound "sound/%1" server_var(cgs_saved) es_stringtable downloadables server_var(cgs_tmp_sound) } // All hostages rescued if (server_var(cgs_hostages_rescued) != 0) do { es_format cgs_tmp_sound "sound/%1" server_var(cgs_hostages_rescued) es_stringtable downloadables server_var(cgs_tmp_sound) } // Hostages not rescued if (server_var(cgs_hostages_not_rescued) != 0) do { es_format cgs_tmp_sound "sound/%1" server_var(cgs_hostages_not_rescued) es_stringtable downloadables server_var(cgs_tmp_sound) } //Setup counters es_xsetinfo cgs_t_score 0 es_xsetinfo cgs_ct_score 0 es_gettime cgs_starttime es_xsetinfo cgs_currenttime 0 es_xmathparse cgs_timeleft "mp_timelimit * 60" } event server_cvar { if (event_var(cvarname) == mp_winlimit) do { score get cgs_ct_score #ct score get cgs_t_score #t if (event_var(cvarvalue) <>



Você deverá mudar o nome dos arquivos nessa parte do codigo, colocando o nome dos arquivos de som que vc inseriu na pasta cstrike\sound\map_sounds


QUOTE
// Round Draw
//es_xsetinfo cgs_round_draw "mk4-awwbaby.wav"
//
// Game Commencing
//es_xsetinfo cgs_game_start "mk4-excellent.wav"
//
// CTs Win
es_xsetinfo cgs_cts_win "ctwin8.mp3"
//
// Terrorists Win
es_xsetinfo cgs_ts_win "twin7.mp3"
//
// Target Bombed
es_xsetinfo cgs_bombed "twin2.mp3"
//
// Bomb Defused
es_xsetinfo cgs_defused "ctwin2.mp3"
//
// Target Saved
//es_xsetinfo cgs_saved "mk4-supurb.wav"
//
// All hostages rescued
es_xsetinfo cgs_hostages_rescued "ctwin8.mp3"
//
// Hostages Not Rescued
es_xsetinfo cgs_hostages_not_rescued "twin7.mp3"
//


os sons tocarão da seguinte forma:

Round Draw - termino do round sem ninguém ganhar
Game Commencing - Inicio do Round
CTs Win - Counter Terrorist Ganharam Matando o ultimo Terrorista
Terrorists Win - Terroristas Ganharam Matando o ultimo Terrorista
Target Bombed - Quando a bomba explodir (Terroristas ganharam)
Bomb Defused - Quando a bomba for defusada ( CTS Ganharam)
Target Saved - se num mapa de bomba terminar o round sem ninguém plantar a bomba e ainda tiver sobreviventes
All hostages rescued - Todos os Reféns resgatados (CTS Ganharam)
Hostages Not Rescued - Round termina num mapa de refens sem os refens serem resgatados (TRS ganharam)

Tutorial by: Toscano
Quem quiser conferir o resultado disso, é só dar uma passadinha no servidor do Toscano, é 24 Horas, e tem os sons instalados nele.

cruell.no-ip.org

FONTE: http://www.csbrazucas.com/index.php?showtopic=5046