Get other player usernames

Hello,

(Im sorry if someone has asked the same question before.)

So, i have been wondering if i could draw the another Player's username.
( Like this :http://orig04.deviantart.net/b884/f/2015/268/9/5/another_player_username_by_faiz876-d9awr7f.png )

Any helps are welcomed

Replies (5)

Last message on 23 Jan 2017

Size43 (Administrator) on 26 Sep 2015, 13:56:21
You can obtain the players name by either calling
gms_other_get(player_id, "name")

in the other player object, or simply using the "name"-variable in the other player object. Both player_id and name are automatically created by the extension.

You can then draw the name in any way you like, just like you would with normal strings.
KadePcGames on 22 Jan 2017, 02:38:27
Can You Give Us An Example?
KadePcGames on 22 Jan 2017, 03:00:02
And The Only Reason Why Is That i Get This Error ############################################################################################
FATAL ERROR in
action number 2
of Create Event
for object obj_other_player:

Variable obj_other_player.player_id(100002, -2147483648) not set before reading it.
at gml_Object_obj_other_player_CreateEvent_2 (line 1) - gms_other_get(player_id, "name")
############################################################################################
Size43 (Administrator) on 22 Jan 2017, 09:36:53
In the draw event:

draw_text(x, y, gms_other_get(player_id, "name"))
KadePcGames on 23 Jan 2017, 04:27:34
All right thanks