Raised This Month: $ Target: $400
 0% 

[SOLVED] Get Entity origin|vector|velocity..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 06-24-2010 , 18:17   [SOLVED] Get Entity origin|vector|velocity..
Reply With Quote #1

how I know origin=vector=velocity

but when I try to get for example "button" origins[3]

<fakemeta>
Code:
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:
Code:
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:
Code:
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?

Last edited by AngeIII; 10-17-2012 at 17:28.
AngeIII is offline
Send a message via Skype™ to AngeIII
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode