Код:
new pEntity = 0;
new Float:vecOrigin[3];
while((pEntity = find_ent_by_class(pEntity, "info_player_start")))
{
entity_get_vector(pEntity, EV_VEC_origin, vecOrigin);
engfunc(EngFunc_TraceHull, vecOrigin, vecOrigin, DONT_IGNORE_MONSTERS, HULL_HUMAN, pEntity, 0);
if(get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen)) continue;
entity_set_origin(id, vecOrigin);
break;
}
Код:
new Ent = -1;
while((Ent = rg_find_ent_by_class(Ent, "info_player_start")))
{
new Float:Origin[3];
get_entvar(id, var_origin, Origin);
}