Advertisement
Guest User

Untitled

a guest
May 2nd, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <cstrike>
  3. #include <fun>
  4.  
  5. #define PLUGIN "Round Start"
  6. #define VERSION "1.0"
  7. #define AUTHOR "sDs|Aragon*"
  8.  
  9. static const SoundList[][] = {
  10. "misc/timer01.wav",
  11. "misc/timer02.wav",
  12. "misc/timer03.wav",
  13. "misc/timer04.wav",
  14. "misc/timer05.wav",
  15. "misc/timer06.wav",
  16. "misc/timer07.wav",
  17. "misc/timer08.wav",
  18. "misc/timer09.wav",
  19. "misc/timer10.wav"
  20. }
  21. static const StartRound[] = "misc/timestart.wav"
  22.  
  23. new Time, Sound;
  24. public plugin_init() {
  25. register_plugin(PLUGIN, VERSION, AUTHOR)
  26. register_event("HLTV", "NewRound", "a", "1=0", "2=0")
  27. }
  28.  
  29. public plugin_precache() {
  30. for(new i = 0 ; i < sizeof SoundList ; i++)
  31. precache_sound(SoundList[i])
  32. precache_sound(StartRound)
  33. }
  34.  
  35. public NewRound(id) {
  36. Time = get_cvar_num("mp_freezetime");
  37. Sound = (get_cvar_num("mp_freezetime") * 1 - 1);
  38. ShowHUD(id);
  39. }
  40.  
  41. public ShowHUD(id) {
  42. set_hudmessage(0, 100, 200, -1.0, 0.30, 0, 1.0, 1.1, 0.0, 0.0, -111);
  43. if(Time <= 0) {
  44. Time = 0;
  45. Sound = 0;
  46. show_hudmessage(id, "GO! GO! GO!");
  47. client_cmd(id, "spk %s", StartRound)
  48. remove_task(id);
  49. }
  50. else if(Time > 1) {
  51. show_hudmessage(id, "Runda va incepe in %d secunde",Time);
  52. client_cmd(id, "spk %s", SoundList[Sound])
  53. Time--;
  54. Sound--
  55. set_task(1.0, "ShowHUD", id)
  56. }
  57. else if(Time == 1) {
  58. show_hudmessage(id, "Runda va incepe in %d secunda",Time);
  59. client_cmd(id, "spk %s", SoundList[Sound])
  60. Time--;
  61. Sound--
  62. set_task(0.5, "ShowHUD", id)
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement