|
Author
|
Message
|
|
Junior Member
|

11-08-2012
, 07:58
Re: How to set animation for player
|
#1
|
Why do you think so?
If i'm right, the same method is used at biohazard mod, so.. it's efficient anyway.
I've looked through Cheap_Suit codes:
Quote:
if(!pev_valid(g_modelent[index]))
{
static ent
ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
if(pev_valid(ent))
{
engfunc(EngFunc_SetModel, ent, g_class_pmodel[g_player_class[index]])
set_pev(ent, pev_classname, MODEL_CLASSNAME)
set_pev(ent, pev_movetype, MOVETYPE_FOLLOW)
set_pev(ent, pev_aiment, index)
set_pev(ent, pev_owner, index)
g_modelent[index] = ent
}
}
else
{
engfunc(EngFunc_SetModel, g_modelent[index], g_class_pmodel[g_player_class[index]])
fm_set_entity_visibility(g_modelent[index], 1)
}
|
Last edited by Good Hash; 11-08-2012 at 08:01.
Reason: mistake
|
|
|
|