Raised This Month: $ Target: $400
 0% 

FCVAR_SERVER cvar register?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 10-22-2012 , 04:15   FCVAR_SERVER cvar register?
Reply With Quote #1

How to?

I am code:

cvar_t verzio = {"my_cvar", "31", FCVAR_SERVER};

And the register:


Code:
void OnPluginsLoaded()
{
	CVAR_REGISTER(&verzio);
}
Dont work! Thanx for helping!
__________________
kiki33hun is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 10-22-2012 , 06:11   Re: FCVAR_SERVER cvar register?
Reply With Quote #2

PHP Code:
/* My Console Variable details */
cvar_t g_Command = { "query_result"""FCVAR_PROTECTED FCVAR_UNLOGGED };

/* My Console Variable pointer */
cvar_t g_pCommand;

void OnAmxxAttachvoid ) {
  
/* Register Console Variable */
  
g_engfuncs.pfnCVarRegister( &g_Command );

  
/* Get the Console Variable pointer */
  
g_pCommand g_engfuncs.pfnCVarGetPointerg_Command.name );

  
/* That is the mode you may assign a value to that Console Variable */
  
g_engfuncs.pfnCvar_DirectSetg_pCommand"Something!" );

__________________

Last edited by claudiuhks; 10-22-2012 at 07:42.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 10-22-2012 , 07:07   Re: FCVAR_SERVER cvar register?
Reply With Quote #3

error C2039: 'pfnCVar_DirectSet' : is not a member of 'enginefuncs_s'
eiface.h(105) : see declaration of 'enginefuncs_s'
__________________
kiki33hun is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 10-22-2012 , 07:40   Re: FCVAR_SERVER cvar register?
Reply With Quote #4

Quote:
Originally Posted by kiki33hun View Post
error C2039: 'pfnCVar_DirectSet' : is not a member of 'enginefuncs_s'
eiface.h(105) : see declaration of 'enginefuncs_s'
PHP Code:
g_engfuncs.pfnCvar_DirectSet // OK
g_engfuncs.pfnCVar_DirectSet // BAD 
__________________

Last edited by claudiuhks; 10-22-2012 at 07:42.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 10-22-2012 , 08:13   Re: FCVAR_SERVER cvar register?
Reply With Quote #5

Thanx worked
__________________
kiki33hun is offline
Reply



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 08:10.


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