First off, you'd have to loop instead of using get_playersnum( ) as the player index. That will not even work, surprised it's not giving you an invalid player error.
Use find_end_in_sphere instead, it's more efficient than looping through the players and checking their origin one by one.