PDA

View Full Version : GetPlayerColor


Blackazur
16/03/2013, 03:44 PM
Hello, i have an Problem how to make that the Playername also "%s" are screened in the normal Playercolor which is setted with "SetPlayerColor" because the Playername is now too with this Color: {B2FFFF} if(pInfo[playerid][pVipLevel] >= 1)
{
new string[128], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername)); {}
format(string, sizeof(string), "{B2FFFF}[VIP] %s: {FFFFFF}%s ",playername, text);
SendClientMessageToAll(GetPlayerColor(playerid), string);
return 0;
}

Patrick
16/03/2013, 04:04 PM
i cant think of any idea. so i experimented this code. and it compiles fine. but i didn't tried the code. so you can try this if this works. please reply back


#define COLOR_VIP "{B2FFFF}"
#define COLOR_WHITE "{FFFFFF}"
new IsVIP[] = ""COLOR_VIP"[VIP]";
//
new string[128], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
//
if(pInfo[playerid][pVipLevel] >= 1)
{
format(string, sizeof(string), "%s %s (%d): "COLOR_WHITE"%s ",IsVIP,playername,playerid,text);
SendClientMessageToAll(GetPlayerColor(playerid), string);
return 0;
}

Blackazur
16/03/2013, 04:06 PM
Thanks, but now how to make it that the Playerid is too screened?

Patrick
16/03/2013, 04:08 PM
Thanks, but now how to make it that the Playerid is too screened?

Edited my code above. try it out.

Denying
16/03/2013, 04:09 PM
What do you mean by "screened"?

EDIT: nevermind.

Patrick
16/03/2013, 04:12 PM
What do you mean by "screened"?

EDIT: nevermind.

for me as i understand about screened
it like mean's show on screen

Vince
16/03/2013, 04:35 PM
format(string, sizeof(string), "{B2FFFF}[VIP] {%06x}%s: {FFFFFF}%s ", GetPlayerColor(playerid) >>> 8, playername, text);