Raised This Month: $ Target: $400
 0% 

register_cvar() and get_pcvar_num()


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hypheni
Senior Member
Join Date: Jul 2011
Location: India
Old 01-12-2013 , 14:25   register_cvar() and get_pcvar_num()
Reply With Quote #1

PHP Code:
new pCvar

public plugin_init() 
{
pCvar register_cvar("sample_cvar""1")
...
...

if(
get_pcvar_num(pCvar) == 1)
  ..echo 
1
else
  ..echo 
0

From the above snippet I'm always getting pCvar value to be 1 while in amxx.cfg its written: sample_cvar 0

I have tried getting the value using get_cvar_num() and in different places like plugin_cfg() but the result is same. What am I missing here ?

Last edited by hypheni; 01-12-2013 at 14:26.
hypheni is offline
Send a message via Skype™ to hypheni
 



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 13:38.


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