AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with get_pcvar_string (https://forums.alliedmods.net/showthread.php?t=88860)

alan_el_more 03-29-2009 18:33

Help with get_pcvar_string
 
What is the function of get_pcvar_string?
if they can give examples of how uses...better :)

fysiks 03-29-2009 18:41

Re: Help with get_pcvar_string
 
http://www.amxmodx.org/funcwiki.php?...ring&go=search
PHP Code:

new cvar_string[32]
get_pcvar_string(cvar_pointercvar_string31


Emp` 03-29-2009 18:42

Re: Help with get_pcvar_string
 
lets say you have the cvar
Code:

sv_testcvar "test cvar"
You would have to use a string to get what the cvar is set to.
Code:

new cvar_string[21];
get_pcvar_string( cvar_pointer, cvar_string, 20 );


Arkshine 03-29-2009 18:44

Re: Help with get_pcvar_string
 
Code:
    new YouCvarPointer;         // [...]         YouCvarPointer = register_cvar( "MyCvar", "Woot!" );         // [...]         new MyVar[ 8 ];     get_pcvar_string( YouCvarPointer, MyVar, charsmax( MyVar ) );

MyVar will contain "Woot!"

alan_el_more 03-29-2009 18:47

Re: Help with get_pcvar_string
 
thanks to all but i still do not understand for which is used :|

Arkshine 03-29-2009 18:49

Re: Help with get_pcvar_string
 
The purpose is to retrieve the value as string contained in the cvar you have created.

alan_el_more 03-29-2009 18:52

Re: Help with get_pcvar_string
 
How do I get that in a cvar takes the colors and then run in a function?


All times are GMT -4. The time now is 08:56.

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