HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <reapi>
  3.  
  4. enum rgb { Float:red, Float:green, Float:blue };
  5. new Float:g_Color[ rgb ];
  6.  
  7. public plugin_init()
  8. {
  9. register_plugin("[ReAPI] Colored Flash", "1.0", "ReHLDS Team");
  10. RegisterHookChain(RG_PlayerBlind, "PlayerBlind");
  11.  
  12. register_cvar("amx_flash_rgb", "255 255 255");
  13.  
  14. new color_rgb[12];
  15. new szRed[4], szGreen[4], szBlue[4];
  16.  
  17. get_cvar_string("amx_flash_rgb", color_rgb, charsmax(color_rgb));
  18. parse(color_rgb, szRed, charsmax(szRed), szGreen, charsmax(szGreen), szBlue, charsmax(szBlue));
  19.  
  20. g_Color[red] = str_to_float(szRed);
  21. g_Color[green] = str_to_float(szGreen);
  22. g_Color[blue] = str_to_float(szBlue);
  23. }
  24.  
  25. public PlayerBlind(const index, const inflictor, const attacker, const Float:fadeTime, const Float:fadeHold, const alpha, Float:color[3])
  26. {
  27. color = g_Color;
  28. return HC_CONTINUE;
  29. }