PHP Code:
public spawn_zombies(TaskID)
{
new Float:Origin[3], target[32]
for(new i=33;i<=entity_count();i++)
{
if(is_valid_ent(i))
{
pev(i, pev_targetname, target, 31)
if(equali(target, "zmSpawn"))
{
entity_get_vector(i,EV_VEC_origin, Origin)
engfunc(EngFunc_TraceHull, Origin, Origin, IGNORE_MONSTERS, HULL_HUMAN, 0, 0);
if(!get_tr2(0,TR_StartSolid)) client_print(0,print_chat,"x:%f y:%f z:%f",Origin[0],Origin[1],Origin[2])
}
}
}
There is 4 entity named "zmSpawn" in map !
Output :
Code:
x : 0.000000 y: 0.0000000 z:0.0000000
x : 0.000000 y: 0.0000000 z:0.0000000
x : 0.000000 y: 0.0000000 z:0.0000000
x : 0.000000 y: 0.0000000 z:0.0000000
Please help me to find the problem
__________________