Добрый день, помогите пожалуйста, как можно воспроизвести анимацию у энити?
Download all Attachments
-
3.7 KB Просмотры: 7
-
162 KB Просмотры: 18
public mine_spawn(id)
{
new Float:flOrigin[3]
pev(id, pev_origin, flOrigin)
if(pev(id, pev_flags) & FL_DUCKING) flOrigin[2]-=16.0
else flOrigin[2]-=32.0
new i_Ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_breakable"))
if(!i_Ent) return
set_pev(i_Ent, pev_classname, "Mine")
engfunc(EngFunc_SetModel, i_Ent, Mine_Model)
engfunc(EngFunc_SetOrigin, i_Ent, flOrigin)
set_pev(i_Ent, pev_solid, SOLID_TRIGGER)
set_pev(i_Ent, pev_movetype, MOVETYPE_TOSS)
engfunc(EngFunc_SetSize, i_Ent, Float:{-4.0, -4.0, 0.0}, Float:{4.0, 4.0, 3.0})
set_pev(i_Ent, pev_takedamage, DAMAGE_NO)
set_pev(i_Ent, pev_iuser1, zp_get_user_zombie(id))
set_pev(i_Ent, pev_iuser2, id)
emit_sound(i_Ent, CHAN_WEAPON, Mine_Sound_Place, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
public mine_spawn(id)
{
new Float:flOrigin[3]
pev(id, pev_origin, flOrigin)
if(pev(id, pev_flags) & FL_DUCKING) flOrigin[2]-=16.0
else flOrigin[2]-=32.0
new i_Ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_breakable"))
if(!i_Ent) return
set_pev(i_Ent, pev_classname, "Mine")
engfunc(EngFunc_SetModel, i_Ent, Mine_Model)
engfunc(EngFunc_SetOrigin, i_Ent, flOrigin)
set_pev(i_Ent, pev_solid, SOLID_TRIGGER)
set_pev(i_Ent, pev_movetype, MOVETYPE_TOSS)
engfunc(EngFunc_SetSize, i_Ent, Float:{-4.0, -4.0, 0.0}, Float:{4.0, 4.0, 3.0})
set_pev(i_Ent, pev_takedamage, DAMAGE_NO)
set_pev(i_Ent, pev_iuser1, zp_get_user_zombie(id))
set_pev(i_Ent, pev_iuser2, id)
emit_sound(i_Ent, CHAN_WEAPON, Mine_Sound_Place, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
set_pev(i_Ent, pev_sequence, 0);
set_pev(i_Ent, pev_framerate, 1.0);
set_pev(i_Ent, pev_animtime, get_gametime() + 0.5);
}