hlmod.hu
https://hlmod.hu/

zp_humans_sound
https://hlmod.hu/viewtopic.php?f=9&t=8200
Oldal: 1 / 1

Szerző:  pixxa112 [2013.04.22. 13:52 ]
Hozzászólás témája:  zp_humans_sound

Hali.

Valaki ezt ki tudná javítani úgy, hogy szóljon a hang amikor késelek a levegőbe vagy a falba vagy a zombiba.

A hit résznél.

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fakemeta>
  3. #include <zombieplague>
  4.  
  5. new const g_survivor_hit_sound[][] = { "just_human/knife_hit1.wav" , "just_human/knife_hit2.wav" , "just_human/knife_hit3.wav" , "just_human/knife_hit4.wav" , "just_human/knife_hitwall1.wav" , "just_human/knife_slash1.wav" , "just_human/knife_slash2.wav" , "human/knife_stab.wav" }
  6. new const g_survivor_pain_sound[][] = { "just_human/pain.wav" , "just_human/pain1.wav" }
  7. new const g_survivor_die_sound[][] = { "just_human/pain2.wav" , "just_human/pain4.wav" }
  8.  
  9. #define PLUGIN "Ember hit and pain & die hang"
  10. #define VERSION "0.1"
  11. #define AUTHOR "frisT & pixxa112"
  12.  
  13. public plugin_init()
  14. {
  15. register_plugin(PLUGIN, VERSION, AUTHOR)
  16.  
  17. register_forward(FM_EmitSound, "fw_EmitSounHuman")
  18. }
  19.  
  20.  
  21. public plugin_precache()
  22. {
  23. for(new iPlayer = 0; iPlayer < sizeof g_survivor_hit_sound; iPlayer ++)
  24. {
  25. precache_sound(g_survivor_hit_sound[iPlayer])
  26. }
  27. for(new iPlayer = 0; iPlayer < sizeof g_survivor_paint_sound; iPlayer ++)
  28. {
  29. precache_sound(g_survivor_pain_sound[iPlayer])
  30. }
  31. for(new iPlayer = 0; iPlayer < sizeof g_survivor_die_sound; iPlayer ++)
  32. {
  33. precache_sound(g_survivor_die_sound[iPlayer])
  34. }
  35. }
  36.  
  37.  
  38. public fw_EmitSounHuman(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)
  39. {
  40. if (sample[0] == 'h' && sample[1] == 'o' && sample[2] == 's' && sample[3] == 't' && sample[4] == 'a' && sample[5] == 'g' && sample[6] == 'e')
  41. return FMRES_SUPERCEDE;
  42.  
  43. if (!is_user_connected(id) )
  44. return FMRES_IGNORED;
  45.  
  46. if(sample[7] == 'b' && sample[8] == 'h' && sample[9] == 'i' && sample[10] == 't')
  47. {
  48. if(!zp_get_user_zombie(id) && !zp_get_user_survivor(id) && !zp_get_user_nemesis(id))
  49. {
  50. emit_sound(id, channel, g_survivor_pain_sound[random_num(0, sizeof g_survivor_hit_sound - 1)] , volume, attn, flags, pitch)
  51. return FMRES_SUPERCEDE
  52. }
  53. }
  54.  
  55. if(sample[7] == 'b' && sample[8] == 'h' && sample[9] == 'i' && sample[10] == 't')
  56. {
  57. if(!zp_get_user_zombie(id) && !zp_get_user_survivor(id) && !zp_get_user_nemesis(id))
  58. {
  59. emit_sound(id, channel, g_survivor_pain_sound[random_num(0, sizeof g_survivor_pain_sound - 1)] , volume, attn, flags, pitch)
  60. return FMRES_SUPERCEDE
  61. }
  62. }
  63. if(sample[7] == 'd' && ((sample[8] == 'i' && sample[9] == 'e') || (sample[8] == 'e' && sample[9] == 'a')))
  64. {
  65. if(!zp_get_user_zombie(id) && !zp_get_user_survivor(id) && !zp_get_user_nemesis(id))
  66. {
  67. emit_sound(id, channel, g_survivor_die_sound[random_num(0, sizeof g_survivor_die_sound - 1)] , volume, attn, flags, pitch)
  68. return FMRES_SUPERCEDE
  69. }
  70. }
  71. return FMRES_IGNORED
  72. }

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