29.12.2010, 18:01
Quote:
// Make the players marker invisible to the player while keeping chat colour the same. SetPlayerMarkerForPlayer( 42, 1, ( [b]GetPlayerColor( 1 ) & 0xFFFFFF00 ) ); // Make the players marker fully opaque (solid) to the player while keeping chat colour the same. SetPlayerMarkerForPlayer( 42, 1, ([b] GetPlayerColor( 1 ) | 0x000000FF ) ); |
The first line:
Код:
GetPlayerColor( 1 ) & 0xFFFFFF00
This keeps the RGB (red, green, blue) part of the player's color but makes the Alpha (the last "00") 0, making the player's dot on the radar completely transparent.
If the player's color was 0x00FF00FF (green and full alpha), the color is set to 0x00FF0000 after this.
The second line:
Код:
GetPlayerColor( 1 ) | 0x000000FF
This keeps the player's color and sets the alpha to "FF", no matter what the alpha value of the player was before.
The player's dot will be fully opaque (non-transparent).
If the player's color was 0x00FF0000 (green and no alpha), the color is set to 0x00FF00FF after this.