Raised This Month: $51 Target: $400
 12% 

[Solved] Getting Entity Origins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheKidz
Senior Member
Join Date: May 2009
Old 12-03-2010 , 21:38   [Solved] Getting Entity Origins
Reply With Quote #1

PHP Code:
public plugin_precache( ) {
    
RegisterHamHam_Spawn"func_pushable""Fwd_SpawnPushable")
}
public 
Fwd_SpawnPushableiEnt ) {
    new 
Float:iOrigin]
    
peviEntpev_originiOrigin )
    
server_print"%f %f %f"iOrigin], iOrigin], iOrigin] )
    
remove_entityiEnt )

server_print:
Code:
0.000000 0.000000 1.000000
im sure the entity isnt in that origins... so... whats the problem ?
__________________
TheKidz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-03-2010 , 22:18   Re: Getting Entity Origins
Reply With Quote #2

You have to get the brush entity origin (absmax - absmin).
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
TheKidz
Senior Member
Join Date: May 2009
Old 12-03-2010 , 22:52   Re: Getting Entity Origins
Reply With Quote #3

and how should i do this ? example please if its possible ;x
__________________
TheKidz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-04-2010 , 00:06   Re: Getting Entity Origins
Reply With Quote #4

Search.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
TheKidz
Senior Member
Join Date: May 2009
Old 12-04-2010 , 14:00   Re: Getting Entity Origins
Reply With Quote #5

yea, the power of search
thanks exolent !
took from arkshine's help:
PHP Code:
stock fm_get_brush_entity_originindexFloat:origin] ) {
    new 
Float:mins], Float:maxs]
    
pev(indexpev_minsmins)
    
pev(indexpev_maxsmaxs)

    
origin] = ( mins] + maxs] ) * 0.5
    origin
] = ( mins] + maxs] ) * 0.5
    origin
] = ( mins] + maxs] ) * 0.5

    
return 1;


__________________

Last edited by TheKidz; 12-04-2010 at 14:02.
TheKidz is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-04-2010 , 14:08   Re: [Solved] Getting Entity Origins
Reply With Quote #6

Well what r brush entities and
Why does pev_origin returns a false value for brush entities ?
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 12-04-2010 , 15:17   Re: [Solved] Getting Entity Origins
Reply With Quote #7

Quote:
Originally Posted by abdul-rehman View Post
Well what r brush entities and
Why does pev_origin returns a false value for brush entities ?
Brush entities are like func_wall and stuff that are created by the map itself.
I had the same problem a while ago, i didn't know this was possible, so i fixed it on a very stupid way

Don't know why it's returning false value's.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Reply



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 02:35.


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