[Easy] Draw player's usernames!

Posted by KadePcGames
Okay, so this is gonna be pretty simple. First, go into your obj_other_player object then in the draw event add this code
draw_set_font(fnt_name);
draw_set_colour(c_white);
draw_text(x, y, gms_other_get(player_id, "name"))
draw_self()

This will draw the players username.
Another cool thing you can do with this is like this:
draw_set_font(fnt_name);
if gms_other_admin_rights(player_id) > 0 {
if "name" == "KadePcGames" {
draw_text_colour(x, y, gms_other_get(player_id, "name"),c_blue,c_blue,c_blue,c_blue,c_blue)
draw_self()
} else {
draw_text_colour(x, y, gms_other_get(player_id, "name"),c_green,c_green,c_green,c_green,c_green)
draw_self()
}
} else {
draw_set_colour(c_white);
draw_text(x, y, gms_other_get(player_id, "name"))
draw_self()
}

Basicly this code checks if the player has admin rights and if so checks if its my username and then it draws my name in blue, if its not me it draws the admin's username in green. And if its not a admin it draws it normaly

Replies (1)

Last message on 23 Apr 2018

lazerg on 23 Apr 2018, 17:37:06
Thanks