gms_friend_name

Usage: gms_friend_name ( user_id )

Description

Returns the name of the friend with the given user_id. The user_id can only be obtained by using a server_friend_* function. If the user doesn't exist, or the user isn't a friend, an empty string ("") will be returned.

Example

//Draw all friends

var n, user_id, name;
for(n = 0; n < gms_friend_count(); n += 1)
{
user_id = gms_friend_get(n);
name = gms_friend_name(user_id)
draw_text(0, n * 20, name);
}

Replies (6)

Last message on 13 Aug 2019

DeadDuck on 27 Jul 2019, 06:35:07
Crush my game, if i trying check not friend player.
Size43 (Administrator) on 10 Aug 2019, 21:50:27
Could you post the code that you're using? And what is the exact error message you get?
DeadDuck on 13 Aug 2019, 09:42:32
Actually... I didn't see "The user_id can only be obtained by using a server_friend_* function.".
Sorry :`|
ramaraunt on 15 Oct 2016, 04:13:05
you mispelt function.
Size43 (Administrator) on 23 Oct 2016, 19:15:50
Fixed.
Forgeio on 16 Oct 2016, 01:10:40
You misspelled "misspelled" :P