Raised This Month: $ Target: $400
 0% 

server cvar and printing them


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Honors
Member
Join Date: Jul 2011
Old 07-25-2011 , 08:43   Re: server cvar and printing them
Reply With Quote #2

Code:
new pCvarMaxRate public plugin_init( ) {      register_clcmd( "say /test" , "cmdTest" )      pCvarMaxRate = get_cvar_pointer( "sv_maxrate" ) } public cmdTest( id ) {      client_print( id , print_chat , "sv_maxrate --> %.0f" , get_pcvar_float( pCvarMaxRate ) ) }

In your code, you show the pointer of cvar sv_maxrate (in RAM Memory) so, the value can be 2, or 598746, or 1475...

Look at this picture :

http://**************/photo/my-images/69/5158.png/

You should understand with that. Each cvar has his pointer in RAM Memory. So, you have to get the value of the cvar with get_pcvar_num|float|string.

Last edited by Honors; 07-25-2011 at 08:51.
Honors 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 00:47.


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