Friend request and follow methods for custom leaderboards

I have a custom leaderboard and I want people to be able to make friends in my game.

[code]Function void Player:PromptSendFriendRequest(Player receivingPlayer)

Function void Player:PromptReceiveFriendRequest(Player sendingPlayer)

Function FriendRequestStatus Player:GetFriendRequestStatus(Player otherPlayer)

Function void Player:PromptFollow(Player otherPlayer)

Event Player.FriendRequestStatusChanged(Player otherPlayer, FriendRequestStatus status)

Enum FriendRequestStatus
0 NoPendingRequest
1 SentPending
2 ReceivedPending
3 PlayersAreFriends[/code]

PromptSendFriendRequest would prompt the Player to send a friend request to receivingPlayer through a core gui, where they have the option to either send the friend request or to cancel.

PromptReceiveFriendRequest would prompt the Player to either accept or decline someone else’s friend request.

GetFriendRequestStatus tells you the status of a friend request to a specific player. If there is no pending friend request then it will return NoPendingRequest, if there is a pending request sent by Player it will return SentPending, if there is a pending request sent by otherPlayer it will return ReceivedPending, if the players are already friends it will return PlayersAreFriends.

PromptFollow would prompt the Player to follow otherPlayer with a core gui the same way PromptSendFriendRequest works.

FriendRequestStatusChanged will fire whenever the Player receives a friend request, sends a friend request, accepts a friend request, or declines a friend request. It will return the other player involved in the action and the corresponding FriendRequestStatus.

The idea is that you would have player1 click a button on your custom leaderboard to send a friend request to another player. You would call PromptSendFriendRequest on player1 for player2 and player1 would confirm that they want to send a friend request. Then FriendRequestStatusChanged will fire for both players. A script would listen for that and call PromptReceiveFriendRequest on player2 and then they would either accept or decline the request.

7 Likes

Also came up at RDC Europe last weekend, you should try and convince Sorcus with this post

Nice approach.
Needs reporting prompting as well.

Also, related proposals:
http://developer.roblox.com/forum/studio-features/11996-prompting-social-actions
http://developer.roblox.com/forum/feature-requests/11863-friends-api

It’d probably be based off these: http://wiki.roblox.com/index.php?title=API:Class/FriendService

How would that be useful? It can’t be removed from the escape menu, so you’ll always be able to access it from there.

How would that be useful? It can’t be removed from the escape menu, so you’ll always be able to access it from there.[/quote]

If you’re using a custom leaderboard you can fit it there so it would be at a more or less consistent place.

How would that be useful? It can’t be removed from the escape menu, so you’ll always be able to access it from there.[/quote]

If you’re using a custom leaderboard you can fit it there so it would be at a more or less consistent place.[/quote]

We’re talking about reporting users for doing bad things – that kind of reporting, right?

How would that be useful? It can’t be removed from the escape menu, so you’ll always be able to access it from there.[/quote]

If you’re using a custom leaderboard you can fit it there so it would be at a more or less consistent place.[/quote]

We’re talking about reporting users for doing bad things – that kind of reporting, right?[/quote]

Yes. You can report people from the default leaderboard. If all I want in my custom leaderboard is a color change I see no reason why I should be forced to give up half the features.

APIs like these were rejected. Something to replace them is on the way, but I don’t know exactly what.

APIs like these would make customizing the leaderboard so much easier - I wrote a guide on this a while ago because I found it ridiculous that I had to remove several functions from the leaderboard just to make my custom one usable. Ethan’s point is 100% correct - a few cosmetic changes shouldn’t result in giving up several features.

Many moons later, I don’t believe there has been any progress on this? Please correct me if I’m wrong and fill me in.

APIs like these are pretty vital to use the full functionality of ROBLOX in a social game with a custom leaderboard.

2 Likes

I would love for a feature to know when a player has become friends with somebody. There is no way currently to know if a friend request has been accepted or denied other than doing a constant poll on :IsFriendsWith().

2 Likes