Raised This Month: $51 Target: $400
 12% 

ConVar handles


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-06-2007 , 10:20   ConVar handles
Reply With Quote #1

Question:

new Handle:cvar1 = FindConVar("mp_friendlyfire");
new Handle:cvar2 = FindConVar("mp_friendlyfire");

cvar1 == cvar2?
__________________
I'm a blast from the past!
ferret is offline
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-06-2007 , 10:22   Re: ConVar handles
Reply With Quote #2

Secondary question:

Plugin #1:
new Handle:cvar1 = CreateConVar("sm_blah", blah, blah..);

Plugin #2:
new Handle:cvar2 = FindConVar("sm_blah");

cvar1 == cvar2?
__________________
I'm a blast from the past!
ferret is offline
API
Veteran Member
Join Date: May 2006
Old 07-06-2007 , 11:55   Re: ConVar handles
Reply With Quote #3

Check yourself, PrintToServer("%x ?? %x",cvar1,cvar2);
__________________
API is offline
Send a message via AIM to API
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-06-2007 , 12:39   Re: ConVar handles
Reply With Quote #4

I can't I'm at work!
__________________
I'm a blast from the past!
ferret is offline
DS
SourceMod Developer
Join Date: Sep 2004
Location: WI, USA
Old 07-06-2007 , 13:39   Re: ConVar handles
Reply With Quote #5

Yes, the handles in both of your examples will be equal. One handle is created per cvar as needed.
__________________
エル・プサイ・コングルゥ
DS is offline
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-06-2007 , 13:40   Re: ConVar handles
Reply With Quote #6

Awesome. Exactly what I wanted to hear.
__________________
I'm a blast from the past!
ferret 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 18:35.


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