Raised This Month: $ Target: $400
 0% 

CVAR Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 04-17-2011 , 22:18   CVAR Problem
Reply With Quote #1

I made a PCVar, and then when I try to get it's value, it always returns 0.

When I retrieve it as a stirng, it returns the modelname of something else I have in my plugin.

PHP Code:
public plugin_init()
{
    
register_plugin"Jailbreak Shop""1.0""H3avY Ra1n" );
    
    
gpKatanaCost register_cvar"jb_katana_cost""45000" );

    
server_print"The cost is %i."get_pcvar_numgpKatanaCost ) );

It always prints "The cost is 0" in console. NO IDEA why.

I never set the cvar to the modelname.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
 



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 19:59.


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