Raised This Month: $ Target: $400
 0% 

CVARS?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-17-2012 , 17:34   Re: CVARS?
Reply With Quote #1

Example.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new cvar // new array

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
cvar register_cvar("cvar_on""1"// were registering the cvar

and then at your function.

PHP Code:
public function(id)
{
    if (!(
cvar == 1)) // if it isnt 1 ! = not
    
{
        return 
PLUGIN_HANDLED
    
}
    
    
// continue code

EDIT: u can get the flags info at. addons/amxmodx/configs/users.ini
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.

Last edited by Bilal Pro; 05-17-2012 at 17:43.
Bilal Pro is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 05-17-2012 , 17:46   Re: CVARS?
Reply With Quote #2

Quote:
Originally Posted by Bilal Pro View Post
new cvar // new array
Correction: it is a POINTER (pcvar) pointer to cvar
you retrieve the data with get_pcvar_num/float/flags etc
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-18-2012 , 05:21   Re: CVARS?
Reply With Quote #3

Quote:
Originally Posted by Bilal Pro View Post
Example.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new cvar // new array

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
cvar register_cvar("cvar_on""1"// were registering the cvar

and then at your function.

PHP Code:
public function(id)
{
    if (!(
cvar == 1)) // if it isnt 1 ! = not
    
{
        return 
PLUGIN_HANDLED
    
}
    
    
// continue code

EDIT: u can get the flags info at. addons/amxmodx/configs/users.ini
Seriously, stop trying to help. You don't know what you are doing.
__________________
fysiks is offline
Reply



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 00:29.


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