AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can get_pcvar_num be in plugin init? (https://forums.alliedmods.net/showthread.php?t=208242)

Unkolix 02-11-2013 08:47

Can get_pcvar_num be in plugin init?
 
I mean that I have multiple public ****** and they quite many of them contain the same at their start:
PHP Code:

Unkolix get_pcvar_num (UnkolixScriptNum

Can I just write that in plugin init or somewhere else so I would not have to write it multiple times?

Backstabnoob 02-11-2013 08:52

Re: Can get_pcvar_num be in plugin init?
 
Use plugin_cfg( ) instead of plugin_init( ), as the cvar might not be read yet.

Unkolix 02-11-2013 08:53

Re: Can get_pcvar_num be in plugin init?
 
Should I make plugin_cfg( ) after plugin_init( )?

Kard1nal 02-11-2013 10:06

Re: Can get_pcvar_num be in plugin init?
 
Wherever you want.


All times are GMT -4. The time now is 20:35.

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