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

Round_Start help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
duilio1337
Junior Member
Join Date: Aug 2011
Location: California
Old 06-24-2014 , 13:04   Round_Start help
Reply With Quote #1

I am running a jailbreak plugin that we have been using since before the update. I am having a problem now where the Round_Start event is only being called on some map like jb_snow and not jb_projetocs

PHP Code:
register_logevent"Event_RoundStart"2"1=Round_Start" ); 

Last edited by duilio1337; 06-24-2014 at 13:06.
duilio1337 is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 06-24-2014 , 13:08   Re: Round_Start help
Reply With Quote #2

Without more info we can't really help. Post the code or ask the author of the plugin.
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
duilio1337
Junior Member
Join Date: Aug 2011
Location: California
Old 06-24-2014 , 13:20   Re: Round_Start help
Reply With Quote #3

Its a custom plugin with over 13000 lines. The fact that we have competitors makes it impossible for us to post source code. Its a log event that calls a function. The log event only works on some maps.
duilio1337 is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 06-24-2014 , 13:23   Re: Round_Start help
Reply With Quote #4

It could be other plugins interfering with that function. You can try disabling other plugins one by one to see if it changes. You could also move that plugin to the top of your amxx list. If it is a problem in the code:

Quote:
Originally Posted by joshknifer View Post
Without more info we can't really help. Ask the author of the plugin.
__________________

Last edited by joshknifer; 06-24-2014 at 13:26.
joshknifer is offline
Send a message via Skype™ to joshknifer
duilio1337
Junior Member
Join Date: Aug 2011
Location: California
Old 06-24-2014 , 13:27   Re: Round_Start help
Reply With Quote #5

PHP Code:
public plugin_init()
{
    
register_logevent"Event_RoundStart"2"1=Round_Start" );
}

public 
Event_RoundStart()
{
    for( new 
0g_iMaxPlayersi++ )
    {
        
g_bBoughtUSP[i] = false;
        
g_bBoughtFiveseven[i] = false;
        
g_bBoughtStealth[i] = false;
        
g_bBoughtNade[i] = false;
        
g_bBoughtFlash[i] = false;
        
g_bBoughtShield[i] = false;
        
g_bBoughtGravity[i] = false;
        
g_bBoughtParachute[i] = false;
        
g_bBoughtFreeday[i] = false;
        
g_bBoughtSilentsteps[i] = false;
        
g_bBoughtSkin[i] = false;
        
g_bBoughtHealth[i] = 0;
    }
    
    
g_iMaxGuards 0;
    
g_iMaxPrisoners 0;
    
g_iCurrentBomber 0;
    
g_iSpecialRounds++;
    
g_iDayCounter++;
    
g_iFreedaysBought 0;
    
    
g_iCurrentDay DAY_NONE;
    
g_iCurrentGame LR_NONE;
    
    
set_lights("o");
    
    
msg_create_fog000);
    
    
server_cmd"decalfrequency 15" );
    
server_cmd"mp_flashlight 0" );
    
    if( !
g_bNeedBall )         
        return;         
    if( !
is_valid_entg_iBall ) )         
        
CreateBall0g_vOrigin );     
    else 
    {
        
entity_set_vectorg_iBallEV_VEC_velocityFloat:{ 0.00.00.0 } ); // To be sure ?
        
entity_set_origing_iBallg_vOrigin );
        
entity_set_intg_iBallEV_INT_solidSOLID_BBOX );
        
entity_set_intg_iBallEV_INT_movetypeMOVETYPE_BOUNCE );
        
entity_set_sizeg_iBallFloat:{ -15.0, -15.00.0 }, Float:{ 15.015.012.0 } );
        
entity_set_intg_iBallEV_INT_iuser1);
    }
    
    for( new 
0g_iMaxPlayersi++ )
    {
        if(
is_user_alive(i))
        {
            if(
cs_get_user_team(i) == CS_TEAM_CT)
            {
                
g_bBoughtParachute[i] = true;
                
g_fBallSpeed[i] = 25.0;
                
g_fDaySpeed[i] = 0.0;
                
g_fGangSpeed[i] = 0.0;
                
UpdateSpeed(i);
            } else {
                
g_fBallSpeed[i] = 0.0;
                
g_fDaySpeed[i] = 0.0;
                
UpdateSpeed(i);
            }
        }
    }
    
g_iPointsMultiplier 1;
    
g_bShopAllowed true;
    
g_bGangPerksAllowed true;
    
    for(new 
icharsmax(g_iMultiplierStart); i++) {
        if(
get_systime() > g_iMultiplierStart[i] && get_systime() < g_iMultiplierEnd[i]) {
            
g_iPointsMultiplier g_iMultiplier[i];
            
            if(
g_iMultiplierMessage 4) {
                
ColorChat0NORMAL"%s %i times points enabled. Enjoy!"g_szPrefixg_iMultiplier[i] );
                
g_iMultiplierMessage 0;
            }
        }
    }
    
    
Reset();
    
RemoveAllTasks();
    
    
set_taskget_pcvar_floatg_iVarTimer ), "TASK_PushButton"TASK_CELL );
    
set_taskget_pcvar_floatg_iVarTimer2 ), "TASK_Glow"TASK_FREE );
    
//set_task( get_pcvar_float( cvar_freezetime ) + 1, "TASK_EndFreezeTime", TASK_FREEZE ) 

duilio1337 is offline
Compidence
Junior Member
Join Date: Feb 2014
Old 06-24-2014 , 18:53   Re: Round_Start help
Reply With Quote #6

Although the code could be greatly improved, it should still work fine. Are you 100% certain that the event is not being called?

Add this to the bottom:
PHP Code:
client_print(0print_chat"Event: Event Round_Start"); 
See if it prints the message whenever you think the event is not being called.
Compidence is offline
duilio1337
Junior Member
Join Date: Aug 2011
Location: California
Old 06-24-2014 , 19:52   Re: Round_Start help
Reply With Quote #7

I know it is not being called but I did it any way. As I said, it is being called on jb_snow and not on jb_projetocs
duilio1337 is offline
Compidence
Junior Member
Join Date: Feb 2014
Old 06-24-2014 , 20:50   Re: Round_Start help
Reply With Quote #8

Place the print message above this:

PHP Code:
if( !g_bNeedBall )
return; 
Or even better, explain what it does, and make sure the conditions set there are met.
Compidence is offline
duilio1337
Junior Member
Join Date: Aug 2011
Location: California
Old 06-24-2014 , 21:53   Re: Round_Start help
Reply With Quote #9

You got it. Changed to this and it worked.

PHP Code:
    if( !g_bNeedBall ) {        
        if( !
is_valid_entg_iBall ) )         
            
CreateBall0g_vOrigin );     
        else 
        {
            
entity_set_vectorg_iBallEV_VEC_velocityFloat:{ 0.00.00.0 } ); // To be sure ?
            
entity_set_origing_iBallg_vOrigin );
            
entity_set_intg_iBallEV_INT_solidSOLID_BBOX );
            
entity_set_intg_iBallEV_INT_movetypeMOVETYPE_BOUNCE );
            
entity_set_sizeg_iBallFloat:{ -15.0, -15.00.0 }, Float:{ 15.015.012.0 } );
            
entity_set_intg_iBallEV_INT_iuser1);
        }
    } 
public Event_RoundStart() used to be called in two ways in our plugin.

PHP Code:
register_logevent"Event_RoundStart"2"1=Round_Start" );
register_event"HLTV""Event_RoundStart""a""1=0""2=0" ); 
After removing the HLTV event that someone else added, (finding out that is was being called twice) I did not look over Event_RoundStart again. So on maps that had a soccer ball added it would be called twice and on map without a ball it would be called once.

Thanks for catching that.
duilio1337 is offline
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 09:41.


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