View Single Post
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 02-25-2007 , 21:50   Re: Join Leave HUD Colors
Reply With Quote #15

Im really bad at explaining but here I go..

The color:
I stored the color in the color array. color[0] which is red, color[1] with is green, color[2] which is blue.

If the user is an admin the color is set to:
color[3] = {255, 0, 0}
or
color[0] = 255
color[1] = 0
color[2] = 0

If the user is just a player i've set color[1] to 255 and the rest to 0.

and set the hud message color using the color array
set_hudmessage(color[0], color[1], color[2]....

The admin string:
For the first (%s), this string is controlled if the user is an admin or not.
Another way to do this is:
PHP Code:
new string[6] = admin "Admin" "Player"
show_hudmessage(0"%s %s has just joined |AoC|!^n(Rank is %s)\nSo watch out! =)"stringnamerankpos
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline