Radius around a player
I have found a few different methods of doing this but none of them really what im looking for..
I need one where i can set a radius around certain players if they match a class. The ones i have found and tested.. i cant seem to place the radius around a single player. Help with code or just keywords to search would be greatly appreciated :) Thanks |
Re: Radius around a player
Use FindEntityInSphere
|
Re: Radius around a player
So... i played around using that FindEntityInSphere... and found a tut by Jor.. i belive...
for some reason it finds all entities just fine but cant seem to pick up the class "player".. any one know of some examples i can look at when i searched for that in "Scripting" only like 4 threads where there i believe its because it only gets the closest ent... i need all of the "player" ents. in the sphere. |
Re: Radius around a player
IIRC, you have to loop through the entites using the find ent in sphere function.
|
Re: Radius around a player
Quote:
Thats what i found. but it seems to only find the closest one. |
Re: Radius around a player
Doesn't find_sphere_class work ?
(It also uses FIND_ENTITY_IN_SPHERE so if that one doesn't work the other one should fail in the same way...). Also, if you only need to retrieve players, just use get_players native and check entity_range. |
Re: Radius around a player
1 Attachment(s)
Quote:
**Might not be the most efficient way** |
Re: Radius around a player
Sorry for asking something other. Can someone tell me the difference between these 2 natives?
http://www.amxmodx.org/funcwiki.php?go=func&id=397 http://www.amxmodx.org/funcwiki.php?go=func&id=330 |
Re: Radius around a player
That's something you could find by yourself... You see get_entity_distance is an engine stock, and since you know you have to search before posting (you know right?) you go to engine_stocks.inc and you see what -magic- return floatround(entity_range(ent1, ent2)); and you have your answer.
|
Re: Radius around a player
Quote:
|
| All times are GMT -4. The time now is 01:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.