Raised This Month: $ Target: $400
 0% 

Server crashes in Dodgeball Day


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 12-26-2014 , 05:42   Server crashes in Dodgeball Day
Reply With Quote #1

I give here everything related to Dodgeball
There is no Error logs

The problem is when I turn Day
After 5 seconds that I hold the ball or throw the server falls (crashed)


It's all about Dodgeball.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >

new const g_szDodgeballViewModel[] = "models/Days/v_dodgeball.mdl";
new const 
g_szDodgeballWeaponModel[] = "models/Days/p_dodgeball.mdl";
new const 
g_szDodgeballWorldModel[] = "models/Days/w_dodgeball.mdl";
new const 
g_szDodgeballSound[] = "Days/dodgeball_bounce.wav";

public 
plugin_init()
{
    
register_messageget_user_msgid"TextMsg" ), "Message_TextMsg" );
    
    
register_event"CurWeapon""Event_CurWeapon""be""1=1" );
    
    
register_think"grenade""GrenadeThink" );
    
register_touch"*"," player""PlayerInteract" );
    
register_touch"grenade""*""BallInteract" );
    
    
register_forwardFM_SetModel"FwdSetModel_Pre");
    
register_forwardFM_EmitSound"FwEmitSound_Pre");
    
register_forwardFM_CmdStart"FwCmdStart_Pre");
    
    
RegisterHamHam_Item_Deploy"weapon_hegrenade""FwdDodgeballDeploy_Post");
}

public 
plugin_precache()
{
    static 
precache128 ];
    
    
PrecacheSongs();
    
precache_soundg_szDodgeballSound );
    
precache_modelg_szDodgeballViewModel );
    
precache_modelg_szDodgeballWeaponModel );
    
precache_modelg_szDodgeballWorldModel );
}

public 
FwdSetModel_PreiEntszModel[] )
{
    if ( 
g_iCurrentDay != DODGEBALL_DAY )
        return 
1;
        
    if ( 
equaliszModel"models/w_hegrenade.mdl" ) )
    {
        
entity_set_modeliEntg_szDodgeballWorldModel );
        
        
set_task10.0"RemoveEnt"iEnt );
        
        return 
4;
    }
    
    return 
1;
}

public 
RemoveEntiEnt )
{
    if ( 
pev_validiEnt ) ) remove_entityiEnt );
    
    
remove_taskiEnt );
}

public 
FwEmitSound_PreiEntityiChannelszSample[], Float:fVolumeFloat:fAtteniFlagsiPitch )
{
    if ( 
g_iCurrentDay != DODGEBALL_DAY )
        return 
FMRES_IGNORED;
        
    if( 
containiszSample"he_bounce" ) != -
    {
        if( 
entity_get_floatiEntityEV_FL_fuser1 ) + 0.3 get_gametime() ) 
        {
            
entity_set_float(iEntityEV_FL_fuser1get_gametime() );
            
            
emit_soundiEntityCHAN_ITEMg_szDodgeballSoundVOL_NORMATTN_NORM0PITCH_NORM );
        }
        
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;
}

public 
FwdDodgeballDeploy_PostiEnt )
{
    if ( 
g_iCurrentDay != DODGEBALL_DAY )
        return 
1;
        
    static 
client;
    
    
client get_pdata_cbaseiEnt41);
    
    if ( !
is_user_aliveclient ) )
        return 
1;
        
    
set_pevclientpev_viewmodel2g_szDodgeballViewModel );
    
set_pevclientpev_weaponmodel2g_szDodgeballWeaponModel );
    
    return 
4;
    return 
0;
}

public 
Event_CurWeaponclient )
{
    if ( !
is_user_aliveclient ) )
        return 
1;
        
    static 
CsTeams:iTeamiWeapon;
    
    
iTeam cs_get_user_teamclient )
    
    
iWeapon get_user_weaponclient );
    
    if ( 
iTeam != CS_TEAM_T && IsTerrorDayg_iCurrentDay ) )
    {
        
fm_strip_user_weaponsclient );
        
        return 
1;
    }
        
        case 
DODGEBALL_DAY:
        {
            if ( 
iTeam == CS_TEAM_T && iWeapon != CSW_HEGRENADE )
            {
                
fm_strip_user_weaponsclient );
                
fm_give_itemclient"weapon_hegrenade" );
                
cs_set_user_bpammoclientCSW_HEGRENADE999 );
            }
        }
    }
    
    return 
1;
}

public 
GrenadeThinkiEnt )
{
    if ( 
g_iCurrentDay != DODGEBALL_DAY )
        return 
0;
        
    return 
1;
    return 
0;
}

public 
PlayerInteractiEntclient )
{
    if ( 
g_iCurrentDay != DODGEBALL_DAY || cs_get_user_teamclient ) != CS_TEAM_T )
        return 
0;
        
    static 
szClass32 ];
    
    
entity_get_stringiEntEV_SZ_classnameszClasscharsmaxszClass ) );
    
    if ( 
equaliszClass"grenade" ) )
        
PlayerHitByBallclientiEnt );
        
    return 
0;
}

public 
BallInteractiBalliEnt )
{
    if ( 
g_iCurrentDay != DODGEBALL_DAY )
        return 
0;
    
    if( 
iEnt == 0
    {
        
entity_set_intiBallEV_INT_iuser11);
        
fm_set_renderingiBall );
    }
    
    else
    {
        static 
szClass32 ];
        
        
entity_get_stringiEntEV_SZ_classnameszClasscharsmaxszClass ) );
        
        if( 
equaliszClass"func_") ) 
        {
            
entity_set_intiBallEV_INT_iuser1);
            
set_renderingiBall );
            
            new 
Float:fStart], Float:fEnd], Float:fGround];
            
entity_get_vectoriBallEV_VEC_originfStart );
            
            
fEnd fStart;
            
fEnd] -= 1024.0;
            
            
trace_lineiEntfStartfEndfGround );
            
fGround] += 7.0;
            
            
entity_set_vectoriBallEV_VEC_originfGround );
        }
    }
    
    return 
0;
}

public 
PlayerHitByBallclientiBall 
{
    if ( 
g_iCurrentDay != DODGEBALL_DAY )
        return 
0;
    
    if ( 
entity_get_intiBallEV_INT_iuser1 ) == 1)
    {
        
remove_entityiBall );
        
        return 
0;
    }
    
    static 
iOwner;
    
iOwner entity_get_edictiBallEV_ENT_euser1 );
    
    if ( 
iOwner == client )  
    {
        
entity_set_intiBallEV_INT_iuser1);
        
fm_set_renderingiBall );
        
        return 
0;
    }
    
    if ( 
cs_get_user_teamclient ) == CS_TEAM_T )
    {
        static 
Float:fOrigin], Float:fVec];
        
        
entity_get_vectoriBallEV_VEC_originfOrigin );
        
get_velocity_from_originclientfOrigin5120.0fVec );
        
        
fVec] = 512.0;
        
entity_set_vectorclientEV_VEC_velocityfVec );
        
        static 
Float:fMaxs], Float:f_pOrigin], iHeadshot 0;
        
entity_get_vectorclientEV_VEC_maxsfMaxs );
        
entity_get_vectorclientEV_VEC_originf_pOrigin );
        
f_pOrigin] += fMaxs];
        
        if( 
vector_distancefOriginf_pOrigin ) <= 26.3 )
            
iHeadshot 1
        
        make_deathmsg
iOwnerclientiHeadshot"dodgeball" );
        
user_silentkillclient );
        
remove_entityiBall );
        
        static 
iEnt 0szModel120 ];
        
        while( ( 
iEnt find_ent_by_classiEnt"armoury_entity" ) ) != )
        {
            
entity_get_stringiEntEV_SZ_modelszModelcharsmaxszModel ) );
            
            if ( 
equaliszModelg_szDodgeballViewModel )
                || 
equaliszModelg_szDodgeballWeaponModel )
                || 
equaliszModelg_szDodgeballWorldModel ) )
                    
remove_entityiEnt );
        }
    }
    return 
0;
}

public 
Message_TextMsg()
{
    if ( 
g_iCurrentDay != DODGEBALL_DAY )
        return 
0;
        
    new 
szMsg32 ];
    
    
get_msg_arg_string2szMsgcharsmaxszMsg ) );
    
    if( 
equaliszMsg"#Weapon_Cannot_Be_Dropped" ) )
        return 
1;
    
    if( 
str_to_numszMsg ) > 
    {
        
get_msg_arg_string3szMsgcharsmaxszMsg ) );
        
        if( 
equaliszMsg"#Game_radio" ) ) 
        {
            
get_msg_arg_string5szMsgcharsmaxszMsg ) );
            
            if( 
equaliszMsg"#Fire_in_the_hole" ) )
                return 
1;
        }
    }
    return 
0;


Last edited by Fuck For Fun; 12-27-2014 at 18:59.
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