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

RQ: exec cfg after first round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lqlqlq
Senior Member
Join Date: Jan 2008
Old 07-29-2011 , 07:53   RQ: exec cfg after first round
Reply With Quote #1

I need plugin when after first round, calling cfg file (like start.cfg).
lqlqlq is offline
Aykay
Senior Member
Join Date: Jul 2009
Location: Australia
Old 07-29-2011 , 08:18   Re: RQ: exec cfg after first round
Reply With Quote #2

PHP Code:
#include <amxmodx>

#define PLUGIN "Call Config"
#define VERSION "1.0"
#define AUTHOR ""

new g_round;

public 
plugin_init( ) 
{
    
register_pluginPLUGINVERSIONAUTHOR )
    
    
register_event"HLTV""event_newround""a""1=0""2=0" );
}

public 
event_newround( )
{
    
g_round++
    
    if( 
g_round >= )
        
server_cmd"exec server.cfg" )

__________________

Aykay is offline
Send a message via MSN to Aykay
lqlqlq
Senior Member
Join Date: Jan 2008
Old 07-29-2011 , 08:30   Re: RQ: exec cfg after first round
Reply With Quote #3

It works, but exec repeated.. i need one time to exec a file.
lqlqlq is offline
Aykay
Senior Member
Join Date: Jul 2009
Location: Australia
Old 07-29-2011 , 08:41   Re: RQ: exec cfg after first round
Reply With Quote #4

Sorry.

Change if( g_round >= 1 ) to if( g_round == 1 )
__________________

Aykay is offline
Send a message via MSN to Aykay
lqlqlq
Senior Member
Join Date: Jan 2008
Old 07-29-2011 , 08:46   Re: RQ: exec cfg after first round
Reply With Quote #5

works perfectly, thanks!
lqlqlq is offline
Aykay
Senior Member
Join Date: Jul 2009
Location: Australia
Old 07-29-2011 , 08:49   Re: RQ: exec cfg after first round
Reply With Quote #6

No worries
__________________

Aykay is offline
Send a message via MSN to Aykay
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 09:58.


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