First of all, set_lights affects the environment light, and it also requires a string be passed into it (letters a-z)
Secondly, you wouldn't need mapname and all that junk, since getting the map name isn't something your plugin doesn't focus on.
Thirdly, a plugin already exists to adjust the light when an admin does amx_light <a-z> or <1-26>
Check:
http://forums.alliedmods.net/showthread.php?t=3395
So to answer your question, no, it won't work. Good try, though!
__________________