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

get_pcvar_num doesn't update on server startup?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-03-2018 , 16:33   get_pcvar_num doesn't update on server startup?
Reply With Quote #1

PHP Code:
public plugin_precache( )
{
    
g_iCvars] = register_cvar"random_cvar1""32" ); // number of teams
    
g_iCvars] = register_cvar"random_cvar2""1" ); // number of players in one team
}

public 
plugin_init( ) // tried plugin_cfg too
{
    
g_iMaxTeams get_pcvar_numg_iCvars] );
    
g_iPlayerPerTeam get_pcvar_numg_iCvars] );
    
    
log_to_file"Teams.txt""MaxTeams: %d | Player per team: %d"g_iMaxTeamsg_iPlayerPerTeam );

Code:
L 08/02/2018 - 19:41:03: MaxTeams: 32 | Player per team: 1 // Server start up
L 08/02/2018 - 19:42:28: MaxTeams: 8 | Player per team: 4
On server start up, it shows the values inside .sma, then when round re-starts, it shows correct values, same problem as get_user_msgid() fails to work on server startup?
__________________
edon1337 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2018 , 02:05   Re: get_pcvar_num doesn't update on server startup?
Reply With Quote #2

Where is located this value of 4? amxx.cfg?
__________________
Arkshine is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-04-2018 , 05:44   Re: get_pcvar_num doesn't update on server startup?
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
Where is located this value of 4? amxx.cfg?
Tried both amxx.cfg and server.cfg, same result.
__________________
edon1337 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 13:43.


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