Raised This Month: $ Target: $400
 0% 

Parachute issues..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 01-31-2010 , 01:04   Parachute issues..
Reply With Quote #1

Ok so i have tried the Gun XP mod version and the version back from 05...

nither of them seem to work with this pulgin i am makeing.

PHP Code:
register_forward(FM_PlayerPreThink,"fw_Paratrooper"); 
PHP Code:
public SetSkill(id)
{
    new 
iClassiRank;
    
iClass g_XP[id][Class];
    
iRank g_XP[id][Rank];
    
    if(!
is_user_bot(id))
    {
        if(
iClass == Sniper)
        {
            new 
szPwep32 ], szSwep32 ];
                
            
get_pcvar_string(g_CvarCVAR_PWEP ][iClass][iRank], szPwep32);
            
get_pcvar_string(g_CvarCVAR_SWEP ][iClass][iRank], szSwep32);
            
            
SetSkillsid szPwep szSwep 
            
get_pcvar_numg_CvarCVAR_HEALTH ][ iClass ][ iRank ] ) , 
            
get_pcvar_numg_CvarCVAR_ARMOR ][ iClass ][ iRank ] ) , 
            
get_pcvar_floatg_CvarCVAR_SPEED ][ iClass ][ iRank ]) , 
            
get_pcvar_floatg_CvarCVAR_GRAVITY ][ iClass ][ iRank ] ) );
        }
        
        else if(
iClass == None)
        {
            return 
PLUGIN_HANDLED;
        }
        
        else if(
iClass == Paratrooper)
        {
            new 
szPwep32 ], szSwep32 ];
                
            
get_pcvar_string(g_CvarCVAR_PWEP ][iClass][iRank], szPwep32);
            
get_pcvar_string(g_CvarCVAR_SWEP ][iClass][iRank], szSwep32);
            
            
SetSkillsid szPwep szSwep 
            
get_pcvar_numg_CvarCVAR_HEALTH ][ iClass ][ iRank ] ) , 
            
get_pcvar_numg_CvarCVAR_ARMOR ][ iClass ][ iRank ] ) , 
            
get_pcvar_floatg_CvarCVAR_SPEED ][ iClass ][ iRank ]) , 
            
get_pcvar_floatg_CvarCVAR_GRAVITY ][ iClass ][ iRank ] ) );
            
has_parachute[id] = true;
        }
        
        else
        {
            new 
szPwep32 ], szSwep32 ];
                
            
get_pcvar_string(g_CvarCVAR_PWEP ][iClass][iRank], szPwep32);
            
get_pcvar_string(g_CvarCVAR_SWEP ][iClass][iRank], szSwep32);
            
            
SetSkillsid szPwep szSwep 
            
get_pcvar_numg_CvarCVAR_HEALTH ][ iClass ][ iRank ] ) , 
            
get_pcvar_numg_CvarCVAR_ARMOR ][ iClass ][ iRank ] ) , 
            
get_pcvar_floatg_CvarCVAR_SPEED ][ iClass ][ iRank ]) , 
            
get_pcvar_floatg_CvarCVAR_GRAVITY ][ iClass ][ iRank ] ) );
        }
    }
    return 
PLUGIN_CONTINUE;

PHP Code:
public fwd_Paratrooper(id)
{
    
//parachute.mdl animation information
    //0 - deploy - 84 frames
    //1 - idle - 39 frames
    //2 - detach - 29 frames
    
    
if (!is_user_alive(id) || !has_parachute[id])
        return;

    new 
Float:fallspeed get_pcvar_float(g_Cvar2CVAR_FALLSPEED ]) * -1.0
    
new Float:frame

    
new button pev(idpev_button)
    new 
oldbutton pev(idpev_oldbuttons)
    new 
flags pev(idpev_flags)

    if (
para_ent[id] > && (flags FL_ONGROUND)) 
    {
        
set_view(idCAMERA_NONE)
        
        if (
get_pcvar_num(g_Cvar2CVAR_DETATCH ])) 
        {
            if ( 
pev(para_ent[id],pev_sequence) != 
            {
                
set_pev(para_ent[id], pev_sequence2)
                
set_pev(para_ent[id], pev_gaitsequence1)
                
set_pev(para_ent[id], pev_frame0.0)
                
set_pev(para_ent[id], pev_fuser10.0)
                
set_pev(para_ent[id], pev_animtime0.0)
                return
            }
            
            
pev(para_ent[id],pev_fuser1frame)
            
frame += 2.0
            set_pev
(para_ent[id],pev_fuser1,frame)
            
set_pev(para_ent[id],pev_frame,frame)
            
            if ( 
frame 254.0 )
            {
                
engfunc(EngFunc_RemoveEntitypara_ent[id])
                
para_ent[id] = 0
            
}
        }
        else 
        {
            
engfunc(EngFunc_RemoveEntitypara_ent[id])
            
para_ent[id] = 0
        
}
        return
    } 
Doc-Holiday is offline
 


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 07:27.


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