Find player using find_ent_in_sphere
Hello,
I'd like to find a player(2) using. find_ent_in_sphere and hurt the player(1) when the other player(2) has a boolean on true. Anyone knows how to do that? |
Re: Find player using find_ent_in_sphere
PHP Code:
|
Re: Find player using find_ent_in_sphere
Thanks.
//EDIT : Doesn't work for me :( |
AW: Find player using find_ent_in_sphere
My bad, had a typo, it's working.
|
Re: Find player using find_ent_in_sphere
Use find_sphere_class is far more efficient.
It's like using get_players instead of looping all possible players. PHP Code:
|
Re: Find player using find_ent_in_sphere
@Connor
Isn't find_ent_by_class better than find_sphere_class? Edit: Hehe, you missed get_players(); :D |
Re: Find player using find_ent_in_sphere
Quote:
get_players() is not needed because find_sphere_class() outputs an array of found entities, and returns the number found. |
Re: Find player using find_ent_in_sphere
Quote:
|
Re: Find player using find_ent_in_sphere
Yes, yes... you haven't forgotten get_maxplayers();
And the values of players[0] to players[31] and the value of player aren't 0. No, no... they aren't. |
Re: Find player using find_ent_in_sphere
Quote:
|
| All times are GMT -4. The time now is 16:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.