Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- #include <fun>
- #define PLUGIN "Round Start"
- #define VERSION "1.0"
- #define AUTHOR "sDs|Aragon*"
- static const SoundList[][] = {
- "misc/timer01.wav",
- "misc/timer02.wav",
- "misc/timer03.wav",
- "misc/timer04.wav",
- "misc/timer05.wav",
- "misc/timer06.wav",
- "misc/timer07.wav",
- "misc/timer08.wav",
- "misc/timer09.wav",
- "misc/timer10.wav"
- }
- static const StartRound[] = "misc/timestart.wav"
- new Time, Sound;
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_event("HLTV", "NewRound", "a", "1=0", "2=0")
- }
- public plugin_precache() {
- for(new i = 0 ; i < sizeof SoundList ; i++)
- precache_sound(SoundList[i])
- precache_sound(StartRound)
- }
- public NewRound(id) {
- Time = get_cvar_num("mp_freezetime");
- Sound = (get_cvar_num("mp_freezetime") * 1 - 1);
- ShowHUD(id);
- }
- public ShowHUD(id) {
- set_hudmessage(0, 100, 200, -1.0, 0.30, 0, 1.0, 1.1, 0.0, 0.0, -111);
- if(Time <= 0) {
- Time = 0;
- Sound = 0;
- show_hudmessage(id, "GO! GO! GO!");
- client_cmd(id, "spk %s", StartRound)
- remove_task(id);
- }
- else if(Time > 1) {
- show_hudmessage(id, "Runda va incepe in %d secunde",Time);
- client_cmd(id, "spk %s", SoundList[Sound])
- Time--;
- Sound--
- set_task(1.0, "ShowHUD", id)
- }
- else if(Time == 1) {
- show_hudmessage(id, "Runda va incepe in %d secunda",Time);
- client_cmd(id, "spk %s", SoundList[Sound])
- Time--;
- Sound--
- set_task(0.5, "ShowHUD", id)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement