HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <zombieplague>
  5. #include <fakemeta>
  6.  
  7. #define PLUGIN "[ZP]Infection lighting"
  8. #define VERSION "0.1"
  9. #define AUTHOR "Barney"
  10.  
  11. new cvar_lights,cvar_delay,bool:g_can
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. cvar_lights = register_cvar("zp_lighting", "b")
  15. cvar_delay = register_cvar("zp_infectionlighting_delay","3.0")
  16. register_logevent("logEventRoundStart", 2, "1=Round_Start")
  17. }
  18.  
  19. public logEventRoundStart() g_can = true
  20.  
  21. public zp_user_infected_pre(id){
  22. if(g_can){
  23. thunder()
  24. g_can = false
  25. set_task(get_pcvar_float(cvar_delay),"can")
  26. }
  27. }
  28.  
  29. public can() g_can = true
  30.  
  31. public thunder()
  32. {
  33. engfunc(EngFunc_LightStyle, 0, "v")
  34. client_cmd(0,"speak ambience/thunder_clap.wav")
  35. set_task(1.0,"lightning")
  36. }
  37. public lightning()
  38. {
  39. static light[2]
  40. get_pcvar_string(cvar_lights, light, 1)
  41. engfunc(EngFunc_LightStyle, 0, light)
  42. }
  43.