Thread: [Solved] set_lights in cvar
View Single Post
Author Message
chickez
Junior Member
Join Date: Jun 2020
Location: Slovakia
Old 06-28-2020 , 17:36   set_lights in cvar
Reply With Quote #1

Hey.

I'm beginner in scripting.
I want to create cvar, which will change the light.

Example: server_light "b"
Then set_lights is set to "b".

But doesn't work.

PHP Code:
#include <amxmodx>
#include <engine>

#define PLUGIN "serverLight"
#define VERSION "0.1"
#define AUTHOR "chicken"

new lights[2]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_cvar("server_light"lights)
}

public 
setServerLights() {
    
set_lights(lights)

Any help? Thank you!

Last edited by chickez; 06-29-2020 at 00:07. Reason: solved
chickez is offline