Raised This Month: $ Target: $400
 0% 

How to Get Cvar String and Set Cvar String(and Num Float)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 02-08-2013 , 19:32   Re: How to Get Cvar String and Set Cvar String(and Num Float)
Reply With Quote #2

PHP Code:
    //Get convar as string
    
new String:buffer[128];
    
GetConVarString(somehandlebuffersizeof(buffer));
    
    
//Set convar as string
    
SetConVarString(somehandle"some string");

    
//Get convar as int
    
new value GetConVarInt(somehandle);

    
//Set convar as int (e.g. 100)
    
SetConVarInt(somehandle100);

    
//Get convar as float
    
new Float:value2 GetConVarFloat(somehandle);

    
//Set convar as float, (e.g. 100.0)
    
SetConVarFloat(somehandle100.0);

    
//For completion's sake, get convar as boolean
    
new bool:value3 GetConVarBool(somehandle);

    
//Set convar as boolean (e.g. true)
    
SetConVarBool(somehandletrue); 
__________________

Last edited by 11530; 02-08-2013 at 19:36.
11530 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 23:57.


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