Raised This Month: $ Target: $400
 0% 

Can get_pcvar_num be in plugin init?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-11-2013 , 08:47   Can get_pcvar_num be in plugin init?
Reply With Quote #1

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?

Last edited by Unkolix; 02-11-2013 at 08:54.
Unkolix is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 02-11-2013 , 08:52   Re: Can get_pcvar_num be in plugin init?
Reply With Quote #2

Use plugin_cfg( ) instead of plugin_init( ), as the cvar might not be read yet.
Backstabnoob is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-11-2013 , 08:53   Re: Can get_pcvar_num be in plugin init?
Reply With Quote #3

Should I make plugin_cfg( ) after plugin_init( )?
Unkolix is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 02-11-2013 , 10:06   Re: Can get_pcvar_num be in plugin init?
Reply With Quote #4

Wherever you want.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
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 12:11.


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