Check if player is in radius of entity?
How can I check to see if any player is in the radius of any info_* entities?
|
Re: Check if player is in radius of entity?
find_ent_in_sphere()
|
Re: Check if player is in radius of entity?
I'm a bit confused on how to use find_ent_in_sphere(). I really don't even know how to set the function up to work.
I just need to find if any info_* entities are in the radius of a players id. If there are any info items then it can say... "Found info entity". Code:
|
Re: Check if player is in radius of entity?
Fakemeta !?
Code:
#include <fakemeta> |
Re: Check if player is in radius of entity?
[EDIT] nvm regalis beat me :/
|
Re: Check if player is in radius of entity?
Quote:
I don't know engine realy good.. :P |
Re: Check if player is in radius of entity?
This should be the engine I'm assuming...
Code:
|
Re: Check if player is in radius of entity?
When trying to compile I get a tag mismatch on this line...
entity_get_string(ent, EV_SZ_classname, entClass, 31); Also, should this line be a 0 or -1 at the end...? while((ent = find_ent_in_sphere(ent, forigin, radius)) != 0) |
Re: Check if player is in radius of entity?
Why not using fakemeta?
pev(ent, pev_classname, entClass, 31) works fine ;) But the engine way you posted looks correct too..0o It should be 0 ;) greetz regalis |
Re: Check if player is in radius of entity?
Hmm, I'm not sure why I get the tag mismatch then.
I'm trying to use engine too because the rest of my code is in engine. |
| All times are GMT -4. The time now is 22:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.