stock StworzEnta(szClassname[] = "info_target", Float:origin[3], Float:takedamage, Float:health, ent_classname[]="", model[]="", solid = SOLID_NOT, Float:mins[3], Float:maxs[3])
{
new ent = create_entity(szClassname)
entity_set_origin(ent, origin)
entity_set_float(ent, EV_FL_takedamage, takedamage)
entity_set_float(ent, EV_FL_health, health)
entity_set_string(ent, EV_SZ_classname, ent_classname)
entity_set_model(ent, model)
entity_set_int(ent, EV_INT_solid, solid)
entity_set_size(ent, mins, maxs)
return ent
}
stock AnimujEnta(index, sequence, Float: framerate = 1.0)
{
entity_set_float(index, EV_FL_animtime, get_gametime());
entity_set_float(index, EV_FL_framerate, framerate);
entity_set_float(index, EV_FL_frame, 0.0);
entity_set_int(index, EV_INT_sequence, sequence);
}
Przykładowe użycie obydwu funkcji oraz gotowy plugin(w załączniku):
new Float:origin[3]
entity_get_vector(id, EV_VEC_origin, origin)
new Float:maxs[3] = {16.0,16.0,36.0}
new Float:mins[3] = {-16.0,-16.0,-36.0}
new albert = StworzEnta("info_target", origin, 1.0, 100.0, "albert_npc", "models/player/terror/terror.mdl", SOLID_BBOX, mins, maxs)
AnimujEnta(albert, 1)
Opinie negatywne jak i pozytywne mile widziane
Załączone pliki
Użytkownik MarWit edytował ten post 29.06.2011 16:10