HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /*
  2.   Fordította: BBk - Death of Legend
  3. */
  4.  
  5. #include <amxmodx>
  6. #include <fakemeta>
  7.  
  8. new const g_bomb_sounds[] =
  9. {
  10. "weapons/c4_beep1.wav",
  11. "weapons/c4_beep2.wav",
  12. "weapons/c4_beep3.wav",
  13. "weapons/c4_beep4.wav",
  14. "weapons/c4_beep5.wav",
  15. "weapons/c4_click.wav"
  16. }
  17.  
  18. new cvar_enabled
  19.  
  20. public plugin_init()
  21. {
  22. register_plugin("Csendes Bomba", "1.0", "fezh")
  23.  
  24. cvar_enabled = register_cvar("amx_silent_bomb", "1")
  25.  
  26. register_forward(FM_EmitSound, "fw_EmitSound")
  27. register_logevent("logevent_plantedthebomb", 3, "2=Planted_The_Bomb")
  28.  
  29. register_dictionary("csendes_bomba.txt")
  30. }
  31.  
  32. public fw_EmitSound(ent, channel, const sound[])
  33. {
  34. if (get_pcvar_num(cvar_enabled))
  35. {
  36. for (new i = 0; i < sizeof g_bomb_sounds; ++i)
  37. {
  38. if (equal(sound, g_bomb_sounds[i]))
  39. {
  40. return FMRES_SUPERCEDE;
  41. }
  42. }
  43. }
  44. return FMRES_IGNORED;
  45. }
  46.  
  47. public logevent_plantedthebomb()
  48. {
  49. if (get_pcvar_num(cvar_enabled))
  50. {
  51. client_print(0, print_chat, "[AMXX] %L", LANG_PLAYER, "BOMB_MESSAGE")
  52. }
  53. }