Инфо из engine_stocks.inc:
/* Get the distance between two entities */
stock get_entity_distance(ent1, ent2)
{
return floatround(entity_range(ent1, ent2));
}
« Сентябрь 2024 » | ||||||
---|---|---|---|---|---|---|
Пн | Вт | Ср | Чт | Пт | Сб | Вс |
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
/* Get the distance between two entities */
stock get_entity_distance(ent1, ent2)
{
return floatround(entity_range(ent1, ent2));
}
/* Set rendering of an entity */
stock set_rendering(index, fx=kRenderFxNone, r=255, g=255, b=255, render=kRenderNormal, amount=16)
{
entity_set_int(index,EV_INT_renderfx,fx);
new Float:RenderColor[3];
RenderColor[0] = float(r);
RenderColor[1] = float(g);
RenderColor[2] = float(b);
entity_set_vector(index,EV_VEC_rendercolor,RenderColor);
entity_set_int(index,EV_INT_rendermode,render);
entity_set_float(index,EV_FL_renderamt,float(amount));
return 1;
}
/* If visible = 1, entity will be set to be visible, else invisible. */
stock set_entity_visibility(entity, visible = 1)
{
entity_set_int(entity, EV_INT_effects, visible == 1 ? entity_get_int(entity, EV_INT_effects) & ~EF_NODRAW : entity_get_int(entity, EV_INT_effects) | EF_NODRAW);
return 1;
}