Raised This Month: $ Target: $400
 0% 

check if entity exist on coordinates


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 07-31-2013 , 02:07   Re: check if entity exist on coordinates
Reply With Quote #2

Create g_MapItemOrgins[X][3].

In
g_MapItemOrgins[X][3] keep 1 if spawned else 0.
While spawning Items check if
g_MapItemOrgins[X][3] is 0/1.
If 0 spawn.
ELSE

find entity by class()
and

Quote:
Originally Posted by engine_stocks.inc
/* Get origin of a brush entity */
stock get_brush_entity_origin(ent, Float:orig[3])
{
new Float:Min[3], Float:Max[3];

entity_get_vector(ent, EV_VEC_origin, orig);
entity_get_vector(ent, EV_VEC_mins, Min);
entity_get_vector(ent, EV_VEC_maxs, Max);

orig[0] += (Min[0] + Max[0]) * 0.5;
orig[1] += (Min[1] + Max[1]) * 0.5;
orig[2] += (Min[2] + Max[2]) * 0.5;

return 1;
}
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here

Last edited by Shooting King; 07-31-2013 at 02:17.
Shooting King is offline
 



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 15:58.


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