HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <fakemeta>
  3.  
  4. #define PLUGIN "Custom spray sound"
  5. #define VERSION "0.2"
  6.  
  7. public plugin_init()
  8. {
  9. register_plugin(PLUGIN, VERSION, "v3x");
  10. register_forward(FM_EmitSound, "EmitSound");
  11. }
  12.  
  13. new CUSTOM_SOUND[] = "misc/css_sprayer.wav";
  14.  
  15. public plugin_precache()
  16. precache_sound(CUSTOM_SOUND);
  17.  
  18. public EmitSound(entity, channel, const sound[])
  19. {
  20. if(pev_valid(entity))
  21. {
  22. if(contain(sound, "player/sprayer.wav")!=-1)
  23. {
  24. emit_sound(entity, channel, CUSTOM_SOUND, 1.0, ATTN_NORM, 0, PITCH_NORM);
  25. return FMRES_SUPERCEDE;
  26. }
  27. }
  28. return FMRES_IGNORED;
  29. }