View Single Post
InteX01
Senior Member
Join Date: Jan 2017
Old 01-31-2019 , 11:48   Re: CS Battle Royale (Fortnite/PUBG) v2.8 [UPDATED 01/10/19] [ALL MAPS ARE SUPPORTED]
Reply With Quote #175

Why is it happening that sometimes i just spawn stuck in sky... and cant go down..
and when everything is fine, like plane and all.. and when i land.. still got that velocity that drags me down..

but code seems fine to me.
PHP Code:
public client_PreThinkid )
{
    if( ! 
is_user_aliveid ) )
    return 
PLUGIN_CONTINUE;
    
    if( 
g_bIsPlayerInParachuteid ] )
    {
        new 
Float:fVelocity]; 
        
pevidpev_velocityfVelocity ); 
        
        if( ! 
g_bLandedPlayerid ] && ( ( pevidpev_flags ) & FL_ONGROUND ) || ( pevidpev_flags ) & FL_INWATER ) ) ) // player has landed on ground/ in water
        
{
            
g_bIsPlayerInParachuteid ] = false// not in parachute anymore
            
set_pevidpev_sequencedetach );
            
            
set_pevidpev_solidSOLID_SLIDEBOX );
            
set_pevidpev_movetypeMOVETYPE_WALK );
            
            
ReLocatePlayerid );
            
            
set_user_renderingid );
            
            
client_cmdid"spk sound/%s"g_iSoundsLanding_Sound ] ); // emit landing sound
            
            
g_bLandedPlayerid ] = true;
        }
        
        else if( 
fVelocity] < 0.0 // still in air
        
{
            
fVelocity] = g_fCachedParachuteVelocity;
            
set_pevidpev_velocityfVelocity );
        } 
    }
    return 
PLUGIN_CONTINUE;

InteX01 is offline