What about changing brigthness for client only who want's to change it?
Like /light or /brightness and then choose level from menu by pressing number 1 for lighter and number 2 for darker.
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
public plugin_init() {
register_concmd("amx_svetlost","svetlo",ADMIN_RCON,"broj 1-20")
}
public svetlo(id,level,cid)
{
if (!cmd_access(id,level,cid,2))
return PLUGIN_CONTINUE
new arg[3]
read_argv(1,arg,2)
new inum = str_to_num(arg)
if(inum < 0 || inum > 26 ) return PLUGIN_HANDLED;
if(inum == 0) set_lights("#OFF");
else set_light( inum )
return PLUGIN_HANDLED
}
public set_light ( level ){
new svjetlo[2]
new clevel = (1<<level)
get_flags ( clevel, svjetlo, 1 )
set_lights(svjetlo)
return PLUGIN_HANDLED;
}