|
Author
|
Message
|
|
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
|

06-29-2020
, 23:34
Re: set_lights in cvar
|
#1
|
Quote:
Originally Posted by supertrio17
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);
}
|
You'll need to learn how strings work in Pawn.
__________________
|
|
|
|