CVARS?
Hey,There.
How to make CVARS for our own plugin like "csdm_active 1/0" If it is register_cvar( , , , ,) //explain the 4 arguments please,How to set it to 1/0 condition: 1 - on/ 0 - off Also what are flags like ADMIN_KICK where can I get info about all flags? |
Re: CVARS?
Example.
PHP Code:
PHP Code:
|
Re: CVARS?
Quote:
you retrieve the data with get_pcvar_num/float/flags etc |
Re: CVARS?
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Re: CVARS?
Quote:
|
Re: CVARS?
Lol, when you are changing the cvar you are changing the array so what is wrong on this -.-
|
Re: CVARS?
The "cvar" variable is just an id, not the CVAR value itself. You need to use that id with get_pcvar_* to retrieve the value.
|
Re: CVARS?
@Bilal Pro
seriously, do you know scripting ? I don't know pawn scripting exactly. But I even know how to use a cvar. |
Re: CVARS?
BTW: Bilal Pro, the variable you created isn't an array.
|
Re: CVARS?
If all that confused you, without getting any real answers....here is a CORRECT example of how to define, initialize, and use a CVAR
This is pretty much a Copypasta of an old plugin of mine PHP Code:
NOTE: give_money() function is NOT shown. It is defined later in the code. I just cut the code down for ease of reading. Good luck! :attack: |
| All times are GMT -4. The time now is 00:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.