Getting player shirt / pants colors?
Moderator: InsideQC Admins
2 posts
• Page 1 of 1
Getting player shirt / pants colors?
I'm working on player quickfrags display for my HUD.
How do I get player shirt / pants colors via CSQC?
Also, how do I determine if a player is present or not?
How do I get player shirt / pants colors via CSQC?
Also, how do I determine if a player is present or not?
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
Re: Getting player shirt / pants colors?
Found what I needed:
string = getplayerkeyvalue(-1, "topcolor");
string = getplayerkeyvalue(-1, "bottomcolor");
Above returns color number as used by quake's color cvar from the player currently in the lead.
string = getplayerkeyvalue(-1, "topcolor_rgb");
string = getplayerkeyvalue(-1, "bottomcolor_rgb");
Returns rgb values from the player currently in the lead. Use stov() to convert to a vector.
Also:
string = getplayerkeyvalue(-2, "frags");
Returns frags from runner up player. Returns "" if no runner up, which can be used to determine if there are any other players.
string = getplayerkeyvalue(-1, "topcolor");
string = getplayerkeyvalue(-1, "bottomcolor");
Above returns color number as used by quake's color cvar from the player currently in the lead.
string = getplayerkeyvalue(-1, "topcolor_rgb");
string = getplayerkeyvalue(-1, "bottomcolor_rgb");
Returns rgb values from the player currently in the lead. Use stov() to convert to a vector.
Also:
string = getplayerkeyvalue(-2, "frags");
Returns frags from runner up player. Returns "" if no runner up, which can be used to determine if there are any other players.
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest