View Single Post
LondoN
Senior Member
Join Date: Dec 2015
Location: Roman, Romania.
Old 03-30-2021 , 20:12   Re: create beam between nearest player
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
You're looping through all player indexes without checking if the user is connected. Simply use get_players() or find_sphere_class() since you have a maximum radius.
yes, i see now whats wrong about looping.

but, im pretty unsure about get_players and the loop, how can i return the nearest player in the radius, cuz, at this time, it creates an beam between me an all players in the radius.

also, from what i know, it is other way creating a beam without precaching a sprite, but didn't found any example of this kind of message.

about find_sphere_class, can show an example, i didn't used this and i'm pretty unsure how to use correctly in my case here.
__________________
LondoN is offline