Colored Admin Names? (i got it to work :D )

Posted by KadePcGames
nvm i got it too work

Replies (13)

Last message on 3 Dec 2017

Hamichi on 13 Jul 2017, 23:26:05
How did you get it to work?
Size43 (Administrator) on 14 Jul 2017, 16:35:35
You can check whether someone is an admin like this:

// Other player object
if gms_other_admin_rights(player_id) > 0
    // Draw colored name
} else {
    // Draw normal name
Irfan_animator on 19 Nov 2017, 18:19:17
Size43 i dont understand can you make full of that code and how i find player id please i really need help this first time i use gamemaker server code
Size43 (Administrator) on 3 Dec 2017, 12:45:15
Please see JamSnack's answer and my reply.
JamSnack on 29 Nov 2017, 03:33:15
// Other player object
if gms_other_admin_rights(player_id) > 0 -- Since this code is pretty much only client side all you need to know is if another player is an admin or not. What this does is whenever you go to draw the names it is ran through this if statement, determining whether or not that name is to be colored or not.
draw_set_color(x_yellow) --Here we set the text to be yellow.
draw_text(player_id.x,player_id.y,"" +string(username)) -- Here we draw the text over the player that is being shown (may be incorrect :P), assuming you have a variable to find the player's username.
} else {
// Draw normal name -- The same thing would be done here as above but a different color.
TypicalAndy on 29 Nov 2017, 16:56:32
the draw_text event from you is incorrect, do you know how it is acctually? I want to make something like that too.
Size43 (Administrator) on 3 Dec 2017, 12:44:34
The draw_text should be:

// Other player object, draw event
if gms_other_admin_rights(player_id) > 0
    draw_text(x,y, name)
} else {
// Draw normal name -- The same thing would be done here as above but a different color.

The name and player_id variable are automatically set by the extension.
JamSnack on 30 Nov 2017, 01:15:13
I haven't tested this yet, but I will be experimenting with it soon. I will post the code here when I get it to work.
TypicalAndy on 1 Dec 2017, 18:16:01
Size43 (Administrator) on 3 Dec 2017, 13:33:35
Since I've had a lot of questions asking how to have different colors for admins, there is now also a tutorial explaining this here.
Hamichi on 14 Jul 2017, 21:08:12
How do i make someone admin
Size43 (Administrator) on 14 Jul 2017, 21:46:26
You can add them on this site, in the developers section.
Hamichi on 14 Jul 2017, 20:52:58