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

Weapon firing when MOTD appears | CVAR not updating |


Post New Thread Reply   
 
Thread Tools Display Modes
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-13-2018 , 10:47   Re: Weapon firing when MOTD appears | CVAR not updating |
Reply With Quote #21

My bad then. Is your plugin loading before admin.sma?
__________________

Last edited by klippy; 07-13-2018 at 10:48.
klippy is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-13-2018 , 11:45   Re: Weapon firing when MOTD appears | CVAR not updating |
Reply With Quote #22

Quote:
Originally Posted by edon1337 View Post
I never said it wasn't compilable? szWeaponName is already in my code I just forgot to add it in the code I provided here, not a big deal.
Such thing may cause misunderstanding

Quote:
Originally Posted by edon1337 View Post
but I recently noticed I don't even need the bitsums, so I removed that part.
+1
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-02-2018 , 13:45   Re: Weapon firing when MOTD appears | CVAR not updating |
Reply With Quote #23

Quote:
Originally Posted by KliPPy View Post
My bad then. Is your plugin loading before admin.sma?
Sorry for reviving, but no, it's not called before admin.sma, even if I put the CVARs inside server.cfg, it still prints the CVARs defined in the .sma.

PHP Code:
public plugin_precache( )
{
    
g_iCvars] = register_cvar"csbr_team_num""32" ); // number of teams
    
g_iCvars] = register_cvar"csbr_player_per_team""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 );

It always shows the un-updated CVAR values on first try, then after restarting it's ok. Same problem as get_user_msgid here
Code:
L 08/02/2018 - 19:41:03: MaxTeams: 32 | Player per team: 1
L 08/02/2018 - 19:42:28: MaxTeams: 8 | Player per team: 4
L 08/02/2018 - 19:42:33: MaxTeams: 8 | Player per team: 4
__________________

Last edited by edon1337; 08-02-2018 at 14:49.
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 20:24.


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