gms_friend_send_request
Usage: gms_friend_send_request ( name, callback )
Description
Sends a friend request to the given player.
Calls the script callback when the request is completed. Argument0 is 0 on success (no fault), 1 when the given player is already a friend, or 2 when the given player doesn't exist.
Example
var name;
name = get_string("Who?", "Nobody");
gms_friend_send_request(name);
Replies (8)
Last message on 10 Jan 2017
Hi Size!
I have used this function, but the request sent has to be accepted/declined through the website. How can accept/decline it through the game(Android)? Is mandatory to have an account in the website to manage it?
The idea I want to do, is to have a list of in game friends with a friend's chat. They will share their belogings.
Thx!!!
Size43
(Administrator)
on
3 Jan 2017, 12:45:30
Unfortunately, that's not possible with the current version of GameMaker Server.
The rewrite will be getting better support for this, but that's still at least a few months away from beta.
Ok ,Thx! Im sure that the new updating will be wonderfull!
Another question related to this one. I want to send a variable (send gold for example) to a team colleague, for which I need to use "gms_p2p_send", but for using it, I need the colleague Id. How can I get it? Here
https://gamemakerserver.com/en/docs/script/gms_friend_name/ it says that for getting the id of another player, it has to be a friend before, but I cant manage it through the game. How could I do it?
Size43
(Administrator)
on
10 Jan 2017, 15:25:25
You can use
gms_friend_get to find the user_id of one of your friends.
You can also use the gms_other_* functions to loop over the players in the current session, and get their user_ids.
Hi Dear Size43
Could You Please Send Me A source about friends
for example invite friends and friends can accept invite requests.
Thanks
Size43
(Administrator)
on
11 Jan 2016, 12:16:37
I've got a question.
How do i write the callback script.
Should i do this
[
if argument0 = 0
{
//blah
}
]
or
[
if argument0
{
//blah
}
if argument1
{
//blah
}
]
or what?
( Sorry i dont really understand how to use arguments. )
Size43
(Administrator)
on
7 Oct 2015, 15:23:36
It works like this:
if argument0 == 0
{
}else if argument0 == 1
{
}else if argument0 == 2
{
}