Raised This Month: $403 Target: $400
 100% 

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
Senior 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.6.3 (Report )(1.7 - 77%)
[MM] MetaMod-C V0.99B (Report )(1.0 - 43%)
Base Builder Module Vote For It
( Donate) ( Steam)
Ghosted is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
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
__________________
Knife Bounty
CS Battle Royale (PUBG)
Contact/Ticket System

Tournament Organizer Plugin PM if interested

Last edited by edon1337; 08-02-2018 at 14:49.
edon1337 is offline
Send a message via Skype™ to edon1337
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 20:09.


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