Raised This Month: $32 Target: $400
 8% 

[tf2] how to get cvar value


Post New Thread Reply   
 
Thread Tools Display Modes
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 02-26-2017 , 05:20   Re: [tf2] how to get cvar value
Reply With Quote #11

Unlike OnAllPluginsLoaded forward, I didn't see for OnConfigsExecuted a late load, hence why I recommended OnAllPluginsLoaded forward.


OnAllPluginsLoaded desc:
Quote:
Called after all plugins have been loaded. This is called once for every plugin. If a plugin late loads, it will be called immediately after OnPluginStart().
OnConfigsExecuted
desc:
Quote:
Called when the map has loaded, servercfgfile (server.cfg) has been executed, and all plugin configs are done executing. This is the best place to initialize plugin functions which are based on cvar data.
Notes: This will always be called once and only once per map. It will be called after OnMapStart().
The note kinda convinced me there's no late load support, and oh boy do I see a lot of people here who don't understand why sometimes their sdkhook breaks and most of time forgot to manually call it under OnPluginStart forward, and maybe AskPluginLoad2 forward if you want to know if you are late loaded or not.
__________________
Benoist3012 is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 02-26-2017 , 10:19   Re: [tf2] how to get cvar value
Reply With Quote #12

Isn't OnMapStart() also called on late loads?

It doesn't seem to be documented in the api...

Yet I'm pretty sure that all of my plugins that rely on it being called on late loads, still work.

And if OnConfigsExecuted() will be called after OnMapStart(), which is called on late loads, then OnConfigsExecuted() is also called on late loads.
__________________

Last edited by Chdata; 02-26-2017 at 10:22.
Chdata is offline
sdz
Senior Member
Join Date: Feb 2012
Old 02-26-2017 , 13:02   Re: [tf2] how to get cvar value
Reply With Quote #13

i forgot late loads were a thing
sdz is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-26-2017 , 15:21   Re: [tf2] how to get cvar value
Reply With Quote #14

Quote:
Originally Posted by arne1288 View Post
OnConfigsExecuted:

I guess I may have misunderstood the red part then. :-(
The red part is referring to reading data from cvars. FindConVar is getting the cvar Handle from Core (because Core owns all cvars).
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Reply


Thread Tools
Display Modes

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 21:58.


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