Due to the case where more and more ROBLOX game developers wants custom leaderboards and playerlists in their game, I feel that the restrictions on the current playerlist needs to be improved to let these custom playerlists work with just the amount of features as the default one.
Here’s a quote of message I wrote on the RbxDev Skype Lounge not so long ago, suggesting different approaches in how we can allow for the features of requesting a friendship and reporting a player, without having unintended usage of said features.
While we all know of the prompts you get when receiving a friend request or teleportation without CustomTeleportUI enabled, I suggest that both the receiver and sender needs to be prompted. If the game wants PlayerA to friend PlayerB, this assumes that PlayerA accepts to this condition first, while PlayerB can then accept/decline the friend request. This goes for report abusing too [sup](no receiver here)[/sup].
[quote]methods for prompting a friendship (either unfriend, cancel pending friendship or request friendship), as well as report abuse.
http://wiki.roblox.com/index.php?title=API:Enum/FriendStatus – no, I noticed this won’t work, so look below for “FriendStatusAction”
FriendStatusAction (could be a boolean in the case below, though)
[td]Enum name[/td][td]Enum number[/td][td]Description[/td][
[td]RequestFriendship[/td][td]0[/td][td]If not already friends, prompt user to become friends[/td]
[td]RevokeFriendship[/td][td]1[/td][td]If friend request is sent, but not yet accepted, clear it. If friends, remove friend.[/td]
[size=4]A more controlled way would be[/size]
[code]FriendService:PromptFriendship(player targetPlayer[, Enum.FriendStatusAction newStatus = RequestFriendship])
This allows for more dynamic ways of prompting users, such as when clicking on the player’s head, or typing in their name on a list in a GUI. The downside is that a game can spam prompt you, so each time you decline sending a friend request, it’ll prompt you to do it again.
[size=4]While a more secure way would be[/size]
[code]TextButton:BindPromptFriendship(player targetPlayer[, Enum.FriendStatusAction newStatus = RequestFriendship])
Which would then only prompt the player when the player actually clicked on the TextButton. This prevents any form of spamming these prompts. The limitation here is that we only allow users to show the prompt when clicking on a button. No fancy other possibilities as in the case above. This will show a prompt when TextButton.MouseButton1Click is fired, as well as TextButton.TouchTap. To unbind, remove the textbutton, since it shouldn’t have any purpose other than prompting if it’s bound already.
Methods will not work on guests, of course. And will not prompt if trying to revoke friendship while not friends or pending friends. As well as won’t show prompt if trying to friends while already friends.
I think we need a way to prompt (like with teleporting & purchasing assets) users to do the same stuff as the current playerlist does. I see several games, mostly front-page games, which makes use of custom playerlists, and would indeed benefit from this feature. I have suggested either invoking the prompt window like teleportation and purchasing assets does, as well as a more secure way by only prompting when a certain TextButton is clicked.