SetPlayerMarkerForPlayer -
Midzi - 02.08.2015
This function doesn't work in short time after when players respawns.
Code:
Код:
public OnPlayerSpawn(playerid)
{
foreach(new x : Player)
{
if(x == playerid) continue;
SetPlayerMarkerForPlayer(playerid, x, 0x00FF0000); // This works good
SetPlayerMarkerForPlayer(x, playerid, 0x00FF0000); // This doesn't work - why?
}
return 1;
}
It never works properly.
This code also not working:
Код:
Function()
{
foreach(new x : Player)
{
TogglePlayerSpectating(x, 0); // Force player to respawn
}
return 1;
}
public OnPlayerSpawn(playerid)
{
foreach(new x : Player)
{
if(playerid == x) continue;
SetPlayerMarkerForPlayer(playerid, x, 0x00FF0000); // Won't work for respawned players
SetPlayerMarkerForPlayer(x, playerid, 0x00FF0000); // Won't work for respawned players
}
}
Re: SetPlayerMarkerForPlayer -
Crayder - 02.08.2015
If you're going to disable markers, why not use the function that is made for disabling markers? That function isn't made for disabling completely as it seems you are trying to do (he is transparent for everybody and everybody transparent for him).
Re: SetPlayerMarkerForPlayer -
Midzi - 02.08.2015
It's only example.
I want to use this function for hiding players for other team.
But, when player spectate other players - and in next round gonna respawn - this not working, second team see him.
Re: SetPlayerMarkerForPlayer -
Tamer - 03.08.2015
Try this, if you do it this way the player will keep their color at the chat while having their map blip invisible.
pawn Код:
foreach(new i : Player)
{
if(GetPlayerTeam(i) != GetPlayerTeam(playerid) continue;
SetPlayerMarkerForPlayer( i, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
SetPlayerMarkerForPlayer( playerid, i, ( GetPlayerColor( i ) & 0xFFFFFF00 ) );
}
Re: SetPlayerMarkerForPlayer -
ikkentim - 03.08.2015
0x00FF0000 is a transparent color, you should't be seeing the market at all.