I believe that this is what you want:
PHP Code:
#include <amxmodx>
#include <engine>
#define PLUGIN "serverLight"
#define VERSION "0.2"
#define AUTHOR "chicken"
new g_lights
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
g_lights = register_cvar( "amxx_lights", "a" ); //default value would be a
register_event("HLTV", "setServerLights", "a", "1=0", "2=0") //every new round cvar gets updated
}
public setServerLights()
{
new lights[2];
get_pcvar_string(g_lights, lights, 2);
set_lights(lights);
}
__________________