Raised This Month: $ Target: $400
 0% 

Server crashes in Dodgeball Day


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 12-30-2014 , 07:23   Re: Server crashes in Dodgeball Day
Reply With Quote #9

Quote:
Originally Posted by ironskillz1 View Post
Try this:

Code:
public FwdSetModel_Pre( iEnt, szModel[] )
{
    if ( g_iCurrentDay == DODGEBALL_DAY && pev_valid( iEnt ) && equal( szModel,"models/w_hegrenade.mdl" ))
    {
        entity_set_model( iEnt, g_szDodgeballWorldModel );    
        set_task( 10.0, "RemoveEnt", iEnt );
    }
}
still crashed.
HTML Code:
L 12/30/2014 - 14:20:03: -------- Mapchange to jail_xmf --------
Server logging data to file logs/L1230004.log
[AMXX] Loaded 1 admins from file
Debug: 1
Code:
public FwdSetModel_Pre( iEnt, szModel[] )
{
    server_print("Debug: 1")
    if ( g_iCurrentDay == DODGEBALL_DAY && pev_valid( iEnt ) && equal( szModel,"models/w_hegrenade.mdl" ))
    {
        entity_set_model( iEnt, g_szDodgeballWorldModel );    
        set_task( 5.0, "RemoveEnt", iEnt );
        server_print("Debug: 2")
    }
}
and why i see hegrenade throw, and no ball of dodge?


EDIT: More number of debug

Debug: 5
Code:
public FwEmitSound_Pre( iEntity, iChannel, szSample[], Float:fVolume, Float:fAtten, iFlags, iPitch )
{
    server_print("Debug: 5")
    if ( g_iCurrentDay != DODGEBALL_DAY )
        return FMRES_IGNORED;
        
    if( containi( szSample, "he_bounce" ) != -1 ) 
    {
        if( entity_get_float( iEntity, EV_FL_fuser1 ) + 0.3 < get_gametime() ) 
        {
            entity_set_float(iEntity, EV_FL_fuser1, get_gametime() );
            
            emit_sound( iEntity, CHAN_ITEM, g_szDodgeballSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM );
            server_print("Debug: 6")
        }
        
        return FMRES_SUPERCEDE;
    }
    
    return FMRES_IGNORED;
}
Debug: 13
Code:
public PlayerHitByBall( client, iBall ) 
{
    server_print("Debug: 13")
    if ( g_iCurrentDay != DODGEBALL_DAY )
        return 0;
    
    if ( entity_get_int( iBall, EV_INT_iuser1 ) == 1)
    {
        remove_entity( iBall );
        
        return 0;
    }
    
    static iOwner;
    iOwner = entity_get_edict( iBall, EV_ENT_euser1 );
    
    if ( iOwner == client )  
    {
        entity_set_int( iBall, EV_INT_iuser1, 1 );
        fm_set_rendering( iBall );
        
        return 0;
    }
    
    if ( cs_get_user_team( client ) == CS_TEAM_T )
    {
        static Float:fOrigin[ 3 ], Float:fVec[ 3 ];
        
        entity_get_vector( iBall, EV_VEC_origin, fOrigin );
        get_velocity_from_origin( client, fOrigin, 5120.0, fVec );
        
        fVec[ 2 ] = 512.0;
        entity_set_vector( client, EV_VEC_velocity, fVec );
        
        static Float:fMaxs[ 3 ], Float:f_pOrigin[ 3 ], iHeadshot = 0;
        entity_get_vector( client, EV_VEC_maxs, fMaxs );
        entity_get_vector( client, EV_VEC_origin, f_pOrigin );
        f_pOrigin[ 2 ] += fMaxs[ 2 ];
        
        if( vector_distance( fOrigin, f_pOrigin ) <= 26.3 )
            iHeadshot = 1
        
        make_deathmsg( iOwner, client, iHeadshot, "dodgeball" );
        user_silentkill( client );
        remove_entity( iBall );
        
        static iEnt = 0, szModel[ 120 ];
        
        while( ( iEnt = find_ent_by_class( iEnt, "armoury_entity" ) ) != 0 )
        {
            entity_get_string( iEnt, EV_SZ_model, szModel, charsmax( szModel ) );
            
            if ( equali( szModel, g_szDodgeballViewModel )
                || equali( szModel, g_szDodgeballWeaponModel )
                || equali( szModel, g_szDodgeballWorldModel ) )
                    remove_entity( iEnt );
            server_print("Debug: 14")
        }
    }
    return 0;
}

Last edited by Fuck For Fun; 12-30-2014 at 07:28.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
 



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 15:24.


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