Raised This Month: $ Target: $400
 0% 

Solved set_lights in cvar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode