I got it now, will think about this.
EDIT: This works, but it sets the light to the brighest first.
Maybe you can work with this:
PHP Code:
#include <amxmodx>
#include <engine>
#pragma semicolon 1
#define TASK_LIGHT 4841
new const g_szAlphabet[][] =
{
"", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"
};
new g_iLightLvl;
public plugin_init()
register_clcmd("say /changelights", "CmdChangeLights");
public CmdChangeLights(id)
{
g_iLightLvl = sizeof(g_szAlphabet);
set_task(0.1, "TaskChangeLights", TASK_LIGHT, .flags = "b");
}
public TaskChangeLights()
{
if(!--g_iLightLvl)
{
if(!task_exists(TASK_LIGHT))
g_iLightLvl = sizeof(g_szAlphabet);
else
remove_task(TASK_LIGHT);
}
set_lights(g_szAlphabet[g_iLightLvl]);
}
__________________