AngeIII
06-24-2010, 18:17
how I know origin=vector=velocity :P
but when I try to get for example "button" origins[3]
<fakemeta>
new iEntity;
while( ( iEntity = fm_find_ent_by_class( iEntity, "func_button" ) ) > 0 )
{
new Float:origin[3];
pev(iEntity, pev_velocity, origin)
server_print("%f ",origin[0]);
server_print("%f ",origin[1]);
server_print("%f ",origin[2]);
}
stock fm_find_ent_by_class(index, const classname[])
return engfunc(EngFunc_FindEntityByString, index, "classname", classname)
and I will test this:
new iEntity;
while( ( iEntity = fm_find_ent_by_class( iEntity, "func_button" ) ) > 0 )
{
new Float:origin[3];
pev(iEntity, pev_origin, origin)
server_print("%f ",origin[0]);
server_print("%f ",origin[1]);
server_print("%f ",origin[2]);
}
stock fm_find_ent_by_class(index, const classname[])
return engfunc(EngFunc_FindEntityByString, index, "classname", classname)
always return
server print:
0.000000
0.000000
0.000000
so, I think this function pev_velocity,pev_origin work only to "players"?
how to get Entity [button,doors..] origins?
but when I try to get for example "button" origins[3]
<fakemeta>
new iEntity;
while( ( iEntity = fm_find_ent_by_class( iEntity, "func_button" ) ) > 0 )
{
new Float:origin[3];
pev(iEntity, pev_velocity, origin)
server_print("%f ",origin[0]);
server_print("%f ",origin[1]);
server_print("%f ",origin[2]);
}
stock fm_find_ent_by_class(index, const classname[])
return engfunc(EngFunc_FindEntityByString, index, "classname", classname)
and I will test this:
new iEntity;
while( ( iEntity = fm_find_ent_by_class( iEntity, "func_button" ) ) > 0 )
{
new Float:origin[3];
pev(iEntity, pev_origin, origin)
server_print("%f ",origin[0]);
server_print("%f ",origin[1]);
server_print("%f ",origin[2]);
}
stock fm_find_ent_by_class(index, const classname[])
return engfunc(EngFunc_FindEntityByString, index, "classname", classname)
always return
server print:
0.000000
0.000000
0.000000
so, I think this function pev_velocity,pev_origin work only to "players"?
how to get Entity [button,doors..] origins?