hlmod.hu
https://hlmod.hu/

késelés hangok
https://hlmod.hu/viewtopic.php?f=29&t=9827
Oldal: 1 / 1

Szerző:  DanComment [2013.08.02. 21:25 ]
Hozzászólás témája:  késelés hangok

Hali!
Egy olyan plugin kéne ami tartalmaz pár késelés hangot és lejátsza azokat. Más hang nem kell bele.
Köszi megy!

Szerző:  Anonymous1337 [2013.08.02. 22:02 ]
Hozzászólás témája:  Re: késelés hangok

DanComment írta:
Hali!
Egy olyan plugin kéne ami tartalmaz pár késelés hangot és lejátsza azokat. Más hang nem kell bele.
Köszi megy!



A késelés hangot magadnak kell majd betenni!

The Source:

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fakemeta>
  3.  
  4. #define MAX_KNIFE_SNDS 9
  5.  
  6. public plugin_init()
  7. {
  8. register_plugin("Custom knife sounds" , "0.1" , "v3x");
  9. register_forward(FM_EmitSound , "EmitSound");
  10. }
  11.  
  12. // Original knife sounds
  13. new knife_sounds_o[MAX_KNIFE_SNDS][] =
  14. {
  15. "weapons/knife_deploy1.wav",
  16. "weapons/knife_hit1.wav",
  17. "weapons/knife_hit2.wav",
  18. "weapons/knife_hit3.wav",
  19. "weapons/knife_hit4.wav",
  20. "weapons/knife_hitwall1.wav",
  21. "weapons/knife_slash1.wav",
  22. "weapons/knife_slash2.wav",
  23. "weapons/knife_stab.wav"
  24. }
  25.  
  26. // Replacement knife sounds ( edit these!! )
  27. new knife_sounds_r[MAX_KNIFE_SNDS][] =
  28. {
  29. "GHW/weapons/knife_deploy1.wav",
  30. "GHW/weapons/knife_hit1.wav",
  31. "GHW/weapons/knife_hit2.wav",
  32. "GHW/weapons/knife_hit3.wav",
  33. "GHW/weapons/knife_hit4.wav",
  34. "GHW/weapons/knife_hitwall1.wav",
  35. "GHW/weapons/knife_slash1.wav",
  36. "GHW/weapons/knife_slash2.wav",
  37. "GHW/weapons/knife_stab.wav"
  38. }
  39.  
  40. public plugin_precache()
  41. {
  42. for(new i = 0; i < MAX_KNIFE_SNDS; i++)
  43. precache_sound(knife_sounds_r[i]);
  44. }
  45.  
  46. public EmitSound(entity, channel, const sound[])
  47. {
  48. if(pev_valid(entity) && is_user_alive(entity))
  49. {
  50. for(new i = 0; i < MAX_KNIFE_SNDS; i++)
  51. {
  52. if(equal(sound , knife_sounds_o[i]))
  53. {
  54. emit_sound(entity, channel, knife_sounds_r[i], 1.0, ATTN_NORM, 0, PITCH_NORM);
  55. return FMRES_SUPERCEDE;
  56. }
  57. }
  58. }
  59. return FMRES_IGNORED;
  60. }


Üdv.
Anonymous1337

Szerző:  Anonymous1337 [2013.08.02. 22:03 ]
Hozzászólás témája:  Re: késelés hangok

Ha az a kód hibás lenne, akkor itt van még egy:


SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fakemeta>
  3.  
  4. #define MAX_DEATH_SNDS 3
  5.  
  6. public plugin_init()
  7. {
  8. register_plugin("Custom death sounds" , "0.1" , "v3x");
  9. register_forward(FM_EmitSound , "EmitSound");
  10. }
  11.  
  12. new death_sounds_o[MAX_DEATH_SNDS][] =
  13. {
  14. "player/die1.wav",
  15. "player/die2.wav",
  16. "player/die3.wav"
  17. }
  18.  
  19. new death_sounds_r[MAX_DEATH_SNDS][] =
  20. {
  21. "player/newdie1.wav",
  22. "player/newdie2.wav",
  23. "player/newdie3.wav"
  24. }
  25.  
  26. public plugin_precache()
  27. {
  28. for(new i = 0; i < MAX_DEATH_SNDS; i++)
  29. precache_sound(death_sounds_r[i]);
  30. }
  31.  
  32. public EmitSound(entity, channel, const sound[])
  33. {
  34. if(pev_valid(entity) && is_user_alive(entity))
  35. {
  36. for(new i = 0; i < MAX_DEATH_SNDS; i++)
  37. {
  38. if(equal(sound , death_sounds_o[i]))
  39. {
  40. emit_sound(entity, channel, death_sounds_r[i], 1.0, ATTN_NORM, 0, PITCH_NORM);
  41. return FMRES_SUPERCEDE;
  42. }
  43. }
  44. }
  45. return FMRES_IGNORED;
  46. }


Ez elv 100% hogy jó.

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/