show sequence (ESF)
i try this code:
Code:
#include <amxmodx>
#include <engine>
#include <fun>
#include <fakemeta>
#include <amxmisc>
new trans[33];
new modelo[33];
public plugin_init()
{
register_plugin("turbexEvolution", "1.0", "tUrBeX");
register_clcmd("ascend", "toAscend");
return PLUGIN_CONTINUE;
}
public plugin_precache()
{
}
public toAscend(id)
{
//Ver la clase
new clase = entity_get_int(id, EV_INT_playerclass);
//permite saber si ya se hizo la primera transformación
new modeloInicial = entity_get_int(id, EV_INT_modelindex);
//Verificar si ya se hizo la primera transformación
if (modelo[id] != modeloInicial)
{
//Obtener el KI Actual
new KIActual = get_pdata_int(id, 460);
if (KIActual >= 4000000)
{
set_task(0.1, "trans_init", id);
}
}
}
public client_PreThink(id)
{
if(trans[id]==1)
{
entity_set_float(id, EV_FL_framerate, 0.8); //FLY CHARGE
entity_set_int(id, EV_INT_sequence, 27);
entity_set_int(id, EV_INT_gaitsequence, 0);
}
}
public trans_init(id)
{
client_cmd( id, "cam_idealdist 350");
set_user_godmode(id, 1);
trans[id] = 1;
set_pdata_int(id, 199, 1)
set_pdata_int(id, 301, 1, -89 )
entity_set_int( id, EV_INT_flags, entity_get_int( id, EV_INT_flags ) | FL_FROZEN );
set_task(14.5, "trans_finish", id);
}
public trans_finish(id)
{
client_cmd( id, "cam_idealdist 40");
set_user_godmode(id, 0);
set_pdata_int(id, 199, 0)
set_pdata_int(id, 301, 0, -89 )
entity_set_int( id, EV_INT_flags, entity_get_int( id, EV_INT_flags ) & ~FL_FROZEN );
trans[id] = 0;
}
when the player is on the ground, the animation (27 = Fly powerup charge) run normaly, but... when the player is Fly, the animation is not run, only run the first frame... and no more...
what is the problem?
please help
|