| Doc-Holiday |
01-31-2010 01:04 |
Parachute issues..
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 iClass, iRank; iClass = g_XP[id][Class]; iRank = g_XP[id][Rank]; if(!is_user_bot(id)) { if(iClass == Sniper) { new szPwep[ 32 ], szSwep[ 32 ]; get_pcvar_string(g_Cvar[ CVAR_PWEP ][iClass][iRank], szPwep, 32); get_pcvar_string(g_Cvar[ CVAR_SWEP ][iClass][iRank], szSwep, 32); SetSkills( id , szPwep , szSwep , get_pcvar_num( g_Cvar[ CVAR_HEALTH ][ iClass ][ iRank ] ) , get_pcvar_num( g_Cvar[ CVAR_ARMOR ][ iClass ][ iRank ] ) , get_pcvar_float( g_Cvar[ CVAR_SPEED ][ iClass ][ iRank ]) , get_pcvar_float( g_Cvar[ CVAR_GRAVITY ][ iClass ][ iRank ] ) ); } else if(iClass == None) { return PLUGIN_HANDLED; } else if(iClass == Paratrooper) { new szPwep[ 32 ], szSwep[ 32 ]; get_pcvar_string(g_Cvar[ CVAR_PWEP ][iClass][iRank], szPwep, 32); get_pcvar_string(g_Cvar[ CVAR_SWEP ][iClass][iRank], szSwep, 32); SetSkills( id , szPwep , szSwep , get_pcvar_num( g_Cvar[ CVAR_HEALTH ][ iClass ][ iRank ] ) , get_pcvar_num( g_Cvar[ CVAR_ARMOR ][ iClass ][ iRank ] ) , get_pcvar_float( g_Cvar[ CVAR_SPEED ][ iClass ][ iRank ]) , get_pcvar_float( g_Cvar[ CVAR_GRAVITY ][ iClass ][ iRank ] ) ); has_parachute[id] = true; } else { new szPwep[ 32 ], szSwep[ 32 ]; get_pcvar_string(g_Cvar[ CVAR_PWEP ][iClass][iRank], szPwep, 32); get_pcvar_string(g_Cvar[ CVAR_SWEP ][iClass][iRank], szSwep, 32); SetSkills( id , szPwep , szSwep , get_pcvar_num( g_Cvar[ CVAR_HEALTH ][ iClass ][ iRank ] ) , get_pcvar_num( g_Cvar[ CVAR_ARMOR ][ iClass ][ iRank ] ) , get_pcvar_float( g_Cvar[ CVAR_SPEED ][ iClass ][ iRank ]) , get_pcvar_float( g_Cvar[ CVAR_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_Cvar2[ CVAR_FALLSPEED ]) * -1.0 new Float:frame
new button = pev(id, pev_button) new oldbutton = pev(id, pev_oldbuttons) new flags = pev(id, pev_flags)
if (para_ent[id] > 0 && (flags & FL_ONGROUND)) { set_view(id, CAMERA_NONE) if (get_pcvar_num(g_Cvar2[ CVAR_DETATCH ])) { if ( pev(para_ent[id],pev_sequence) != 2 ) { set_pev(para_ent[id], pev_sequence, 2) set_pev(para_ent[id], pev_gaitsequence, 1) set_pev(para_ent[id], pev_frame, 0.0) set_pev(para_ent[id], pev_fuser1, 0.0) set_pev(para_ent[id], pev_animtime, 0.0) return } pev(para_ent[id],pev_fuser1, frame) 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_RemoveEntity, para_ent[id]) para_ent[id] = 0 } } else { engfunc(EngFunc_RemoveEntity, para_ent[id]) para_ent[id] = 0 } return }
|