HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fakemeta>
  4. #include <zombieplague>
  5.  
  6. #define PLUGIN "[ZP]ModeLightstyle"
  7. #define VERSION "1.0"
  8. #define AUTHOR "Arwel"
  9.  
  10. new const LIGHT[7][2]=
  11. {
  12. "_",
  13. "a",//infection
  14. "0",//nemessis
  15. "c",//survivor
  16. "d",//swarm
  17. "e",//multi
  18. "f"//plague
  19. }
  20.  
  21. new szCvarLightStyle[1]
  22.  
  23. public plugin_init()
  24. {
  25. register_plugin(PLUGIN, VERSION, AUTHOR)
  26.  
  27. register_event("HLTV", "EventRoundStart", "a", "1=0", "2=0")
  28.  
  29. set_task(1.0, "GetCvar")
  30. }
  31.  
  32. public GetCvar()
  33. get_cvar_string("zp_lighting", szCvarLightStyle, charsmax(szCvarLightStyle))
  34.  
  35. public EventRoundStart()
  36. {
  37. set_cvar_string("zp_lighting",szCvarLightStyle)
  38. engfunc(EngFunc_LightStyle, 0, szCvarLightStyle)
  39. }
  40.  
  41. public zp_round_started(gamemode, id)
  42. {
  43. set_cvar_string("zp_lighting", LIGHT[gamemode])
  44. engfunc(EngFunc_LightStyle, 0, LIGHT[gamemode])
  45. }