Player:GetPlayerStatus(UserId)

A lot of the core scripts have functions that detect if a player is a friend, following, getting followed, or blocks another user, but we can’t quite do that with custom guis. (ex: If person X is constantly swearing at me and I block them, I can’t see if I block them from another gui to make it so it automatically blocks them).

So, the idea would be to add a new function that gets the status of how a player has relations with another user, without using a long list of other functions, and would return an enum, possibly from one of the following.

Enum.PlayerStatus.Blocking
Enum.PlayerStatus.Blocked
Enum.PlayerStatus.Nothing
Enum.PlayerStatus.Follows
Enum.PlayerStatus.Followed
Enum.PlayerStatus.FollowedAndFollows
Enum.PlayerStatus.Friends

Again, the main purpose would be for custom guis for blocked players and things like that (other uses may be for custom matchmaking). Thoughts?

5 Likes

This can be abused in many ways. Example:

game.Players.PlayerAdded:connect(function(Player) if Player:GetPlayerStatus(game.CreatorId) == Enum.PlayerStatus.Blocking then Player:Kick("unblock me noob, or else") end end)

[quote] This can be abused in many ways. Example:

game.Players.PlayerAdded:connect(function(Player) if Player:GetPlayerStatus(game.CreatorId) == Enum.PlayerStatus.Blocking then Player:Kick("unblock me noob, or else") end end) [/quote]

still better than nothing.

That’s not abuse, if a player doesn’t want people blocking them to be playing in their game, it’s their right to not allow them to play it

[strike]A better example would be forcing them to follow you in order to play the game.[/strike]

Read OP wrong

A better example would be forcing them to follow you in order to play the game.[/quote]

That is not possible with the proposal.

Perhaps it should be Instance Player:GetRelationship(Integer UserId) you also need to account for when they’re friends and followers at the same time. I am not sure I agree on the Blocking ones though, perhaps it would be useful to only include Blocked and not Blocking.

While this solution works for getting information - the need to submit information lacks as well.
Sure, it’s a great idea :smiley: At least it makes custom leaderboards and chat GUIs better.

Though, if this was implemented, I would like to see some sort of way to do this:
http://developer.roblox.com/forum/studio-features/11996-prompting-social-actions
http://developer.roblox.com/forum/feature-requests/11863-friends-api

Though my guess is the admins reluctant on that idea, since they wants us to keep using the default CoreGUI elements.