getPlayer - EdgeIY/infiniteyield GitHub Wiki
table getPlayer(<string> selector, <Player> speaker)
Grabs a list of players based on the inputted string selector or shorthand name. A table is returned by the function containing all the matching player names.
--Note: This is just a snippet
["Function"] = function(args,speaker)
local players = getPlayer(args[1], speaker)
for k,v in pairs(players) do
print(Players[v].Name)
end
endThis function allows you to use the following selectors:
-
all- includes everyone -
others- includes everyone except you -
me- includes your player only -
#[number]- gets a specified amount of random players -
random- affects a random player -
%[team name]- includes everyone on a given team -
allies / team- players who are on your team -
enemies / nonteam- players who are not on your team -
friends- anyone who is friends with you (might not work on someone if ran immediately after you friend them) -
nonfriends- anyone who is not friends with you -
guests- guest players (I don't think guests even exist anymore) -
bacons- anyone with the "bacon" or pal hair -
age[number]- includes anyone below or at the given age -
rad[number]- includes anyone within the given radius
It will also find a player via a short version of their name. Example: If you are trying to select mrcoolkid123 you can just type mrcool