Raised This Month: $ Target: $400
 0% 

Ent sphere


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-24-2007 , 17:11   Ent sphere
Reply With Quote #1

Oh, hi. Actually i want to check if in sphere of a player there is no ent. I know how to get if there is an ent, but dunno how to check if there isn't.

Thanks.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Lord of Destruction
Member
Join Date: Sep 2004
Old 11-24-2007 , 17:18   Re: Ent sphere
Reply With Quote #2

Quote:
Originally Posted by Alka
[Hate n00bs]
me too
This is SO FUNNY

+I seriously hope I got you wrong^^

Last edited by Lord of Destruction; 11-24-2007 at 17:22.
Lord of Destruction is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-24-2007 , 17:47   Re: Ent sphere
Reply With Quote #3

Quote:
Originally Posted by Lord of Destruction View Post
me too
This is SO FUNNY

+I seriously hope I got you wrong^^
What ?! What is the relevance between my post and yours ?! o.O
Go find another post...

@hlstriker - hmm,

Code:
 new Ent = -1;
 while((Ent = engfunc(EngFunc_FindEntityInSphere, Ent, Origin, 100.0)) != 0)
 {
      //Finded a ent... duh
 }
but...should i do a count or something ?! <.<
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-24-2007 , 17:27   Re: Ent sphere
Reply With Quote #4

Check for ents, then if nothing returns that means there aren't any?
hlstriker is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-24-2007 , 17:56   Re: Ent sphere
Reply With Quote #5

PHP Code:
new Ent engfunc(EngFunc_FindEntityInSphere, -1Origin100.0);
if(!
Ent)
    
client_print(0print_chat"Didn't find any entities.");
else
    
client_print(0print_chat"Found entity %i."Ent); 
hlstriker is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-24-2007 , 19:47   Re: Ent sphere
Reply With Quote #6

lawl, i know this, but i thought there is another way, hmm...dunno at what i was think...nvm. Thanks anyway.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 11-26-2007 , 04:14   Re: Ent sphere
Reply With Quote #7

Surely it would always return the player?
purple_pixie is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-26-2007 , 04:40   Re: Ent sphere
Reply With Quote #8

Yes, if you are using the players origin. Which in his case it looks like he is.

Looks like you might have to loop through all the entities and if it's the player who you are checking just skip it.
hlstriker is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-26-2007 , 04:49   Re: Ent sphere
Reply With Quote #9

Isn't the weapon an ent too?
Information? We won't steal your idea.

Last edited by [ --<-@ ] Black Rose; 11-26-2007 at 04:52.
[ --<-@ ] Black Rose is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-26-2007 , 08:59   Re: Ent sphere
Reply With Quote #10

@purple_pixie - Yes, if you do new Ent = engfunc(...) != 0;
@hlstriker - Yes, i do while(...) ;-) and skip the current ent.
@Black Rose - Yes, it is , but i'm not using this with players...
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply


Thread Tools
Display Modes

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 01:20.


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