find_ent_in_sphere , finding opposite team players index?
Hello... I am sorry for making thread, again.
As the title stated, by the way, I know how the native works. My main problem emerges when finding the entities( specifically players ) index. So, I tried. PHP Code:
My main goal is to retrieve all entities( players ) index inside the radius... Thank you for your time... |
Re: find_ent_in_sphere , finding opposite team players index?
PHP Code:
|
Re: find_ent_in_sphere , finding opposite team players index?
Quote:
|
Re: find_ent_in_sphere , finding opposite team players index?
Or y can get enemies players alive and check the distance for each player in a loop
|
Re: find_ent_in_sphere , finding opposite team players index?
@jimaway - or simply use is_user_connected(). Fixed.
@Natseh - it's the same I guess, but I prefer it this way. |
Re: find_ent_in_sphere , finding opposite team players index?
Code:
|
Re: find_ent_in_sphere , finding opposite team players index?
Quote:
|
Re: find_ent_in_sphere , finding opposite team players index?
Quote:
I actually have a question upon your codes. Firstly, isn't the 'iEnt' should be valued to '-1- ? I remembered on the Docs there was stated it should start by '-1' in order to prevent it from missing the first entity that the native should catch. Secondly, I am sorry again, maybe I misunderstood your codes but nevermind, isn't your codes will only retrieve a single player's index? In the 'while' loop, shouldn't the value of 'iEnt' increase ascending for each loop because '!=0' means that when the value of 'iEnt' reached '0' then it will stop the loop and the aftermath will only catch a single player index? Anyone may enlighten the case..... Quote:
|
Re: find_ent_in_sphere , finding opposite team players index?
Quote:
|
Re: find_ent_in_sphere , finding opposite team players index?
Quote:
|
| All times are GMT -4. The time now is 20:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.