Raised This Month: $ Target: $400
 0% 

Finding Entities in a Sphere?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jim_yang
Veteran Member
Join Date: Aug 2006
Old 01-31-2007 , 22:40   Re: Finding Entities in a Sphere?
Reply With Quote #1

ent = total // you assign zero to ent
pev(ent, pev_classname, classname, 31)
if you have just 3 strings, then you don't need loop. this is slow.
why not just use fakemeta_util only.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 01-31-2007 , 23:06   Re: Finding Entities in a Sphere?
Reply With Quote #2

Quote:
Originally Posted by jim_yang View Post
ent = total // you assign zero to ent
pev(ent, pev_classname, classname, 31)
if you have just 3 strings, then you don't need loop. this is slow.
why not just use fakemeta_util only.
I try'ed it without a loop and still nothing, and I left fakemeta include in-there on accident.
Code:
public sphere(id) {     new origin[3],classname[32]     get_user_origin(id,origin)     new ent = engfunc(EngFunc_FindEntityInSphere,ent,origin,100.0)     pev(ent, pev_classname, classname, 31)     for(new i=0;i<sizeof(validents);i++) { //Thanks for XxAvalanchexX for this         if(equali(validents[i],classname)) {             fm_set_rendering(ent,kRenderFxGlowShell,200,130,42,kRenderNormal,16) //Render the ents         }     }     console_print(id,"[DEBUG] Ents found: %d",ent)     return PLUGIN_HANDLED }
Changed it to this, but still returning 0 or a odd amount of ents. It also wont render the selected ones again.

Also, i checked what the classname was returning, I either got 'player' or 'bodyque' when i was near a npc.

Last edited by Drak; 01-31-2007 at 23:20.
Drak is offline
Send a message via MSN to Drak
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 00:35.


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