Raised This Month: $ Target: $400
 0% 

get cvar value that already exist?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-01-2009 , 00:02   Re: get cvar value that already exist?
Reply With Quote #2

No, you are confusing regular cvar retrieval with pcvar retrieval.

Use this:

PHP Code:
new freezetime
freezetime 
get_cvar_num("mp_freezetime"
OR:

PHP Code:
new freezetimepointer
// . . . 
freezetimepointer get_cvar_pointer("mp_freezetime")
// . . .
new freezetime
freezetime 
get_pcvar_num(freezetimepointer
The latter is more efficient.

String/Float:
PHP Code:
new mystring[32]
get_cvar_string("my_string_cvar"mystring31)

new 
Float:myfloat
myfloat 
get_cvar_float("my_float_cvar"
Although, use pcvar instead (same analogous syntax as above).
__________________

Last edited by fysiks; 06-01-2009 at 00:06.
fysiks 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 13:47.


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