senddeathmessage force colour -
ombre - 11.06.2012
Hi,
I use in
- OnGameModeInit ShowPlayerMarkers(1);
- OnPlayerDeath SendDeathMessage(killerid,playerid,reason);
- OnPlayerSpawn SetPlayerColor
So if a player death the team color player is show. Now I create a command for to be invisible for a team ( SetPlayerColor(playerid, 0xFFFFFF00)

but if a player/team kill we see the name in white. I would want that the player/team have the team colour shown when they kills/die while they are invisible.
Thanks.
Re: senddeathmessage force colour -
MP2 - 11.06.2012
If you use
foreach (highly recommended):
pawn Код:
foreach(new i : Player) SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFFFF));
If you don't use foreach:
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++) SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFFFF));
playerid is the player who's blip will become invisible.
i is the player to show an invisible blip to.
That will retain the color.
Re : senddeathmessage force colour -
ombre - 11.06.2012
thanks I saw that, but I want to be invible for 1 team against 1 other team it's not only playerid
Re: senddeathmessage force colour -
MP2 - 11.06.2012
pawn Код:
foreach(new i : Player)
{
if(GetPlayerTeam(i) != GetPlayerTeam(playerid)) // If they are not on the same team
{
SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFFFF));
}
}
Re : senddeathmessage force colour -
ombre - 12.06.2012
Thanks. For playerid ( cmds...) It's ok but for reset the invisible mod after a timer/kill I need to use it:
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[i] == Zone[ zone ][ZoneOwner])
{
for(new a = 0; a < MAX_PLAYERS; a++)
{
if(IsPlayerConnected(a))
{
SetPlayerMarkerForPlayer(a, i, GetPlayerColor(i));
}
}
}
if(gTeam[i] == attacker)
{
for(new a = 0; a < MAX_PLAYERS; a++)
{
if(IsPlayerConnected(a))
{
SetPlayerMarkerForPlayer(a, i, GetPlayerColor(i));
}
}
}
}
}
There are not optimal code?
Re: senddeathmessage force colour -
MP2 - 12.06.2012
Actually I'm having doubts about that. SetPlayerMarkerForPlayer just changes the radar blip, right? So why not just set it to 0xFFFFFF00? It'll be transparent right? SetPlayerColor isn't used so their color should still be the same right? I've said right too many times in this post, right?
I'll test it tomorrow.
Re: senddeathmessage force colour -
Mike_Peterson - 12.06.2012
Quote:
Originally Posted by MP2
Actually I'm having doubts about that. SetPlayerMarkerForPlayer just changes the radar blip, right? So why not just set it to 0xFFFFFF00? It'll be transparent right? SetPlayerColor isn't used so their color should still be the same right? I've said right too many times in this post, right?
I'll test it tomorrow.
|
right.
Re : senddeathmessage force colour -
ombre - 13.06.2012
yes 0xFFFFFFFF don't work 0xFFFFFF00 its correct.
So I test it:
Код:
if(strcmp(cmd, "/test", true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[i] == Zone[ zone ][ZoneOwner])
{
for(new a = 0; a < MAX_PLAYERS; a++)
{
if(IsPlayerConnected(a))
{
SetPlayerMarkerForPlayer(a, i, (GetPlayerColor(i) & 0xFFFFFF00));
}
}
}
if(gTeam[i] == attacker)
{
for(new a = 0; a < MAX_PLAYERS; a++)
{
if(IsPlayerConnected(a))
{
SetPlayerMarkerForPlayer(a, i, (GetPlayerColor(i) & 0xFFFFFF00));
}
}
}
}
}
}
this command works I don't see the player on the map after /test but after I kill him we are visible ( map icon ) if he finds me/close to me. WTF?