stock AdjustMarkers(playerid)
{
for(new i =0; i< MAX_PLAYERS; i++)
{
if(!IsPlayerNPC(i))
{
if(GPM(playerid)==1 && GPM(i)==1)
{
SetPlayerMarkerForPlayer(playerid, i, 0x85170255DD);
}
else
{
SetPlayerMarkerForPlayer(playerid, i, ( GetPlayerColor( i ) & 0xFFFFFF00 ));
}
}
else
{
SetPlayerMarkerForPlayer(playerid, i, ( GetPlayerColor( i ) & 0xFFFFFF00 ));
}
}
}
if(IsPlayerNPC(playerid))
{
SetPlayerColor(playerid,0xFFFFFF00);
}
stock AdjustMarkers(playerid)
{
for(new i =0; i< MAX_PLAYERS; i++)
{
if(!IsPlayerNPC(i))
{
if(GPM(playerid)==1 && GPM(i)==1)
{
SetPlayerMarkerForPlayer(i, playerid, 0x85170255DD);
}
else
{
SetPlayerMarkerForPlayer(i, playerid, ( GetPlayerColor( i ) & 0xFFFFFF00 ));
}
}
else
{
SetPlayerMarkerForPlayer(i, playerid, ( GetPlayerColor( i ) & 0xFFFFFF00 ));
}
}
}
As i am using it under onplayerspwan, i want the playerid to see everyone else's color set as invisible.
Your code means, everyone will see that player's color as invisible. |
public OnPlayerStreamIn(playerid, forplayerid)
{
if(IsPlayerNPC(playerid))
{
SetPlayerMarkerForPlayer(forplayerid, playerid, 0x00000000);
}
else
{
if(!IsPlayerNPC(i))
{
if(GPM(playerid)==1 && GPM(i)==1)
{
SetPlayerMarkerForPlayer(forplayerid, playerid, 0x85170255DD);
}
else
{
SetPlayerMarkerForPlayer(forplayerid, playerid, ( GetPlayerColor( i ) & 0x00000000 ));
}
}
}
return 1;
}
You do understand that I have been trying to set their color to white / grey yet they show as red on minimap.
|
There's a timer that sets colors, but its for players not npc's:
|
public OnPlayerStreamIn(playerid, forplayerid) { if(IsPlayerNPC(playerid)) { SetPlayerMarkerForPlayer(forplayerid, playerid, 0x00000000); // Change to grey/white without Alpha }
stock CheckPlayerColor(playerid)
{
if(!IsPlayerNPC(playerid))
{
if(GetPlayerSkin(playerid) == BANDIT)
{
SetPlayerColor(playerid,COLOR_RED);
}
if(GetPlayerSkin(playerid) == HERO)
{
SetPlayerColor(playerid,COLOR_BLUE);
}
if(GetPlayerSkin(playerid) == NORMAL)
{
SetPlayerColor(playerid,COLOR_WHITE);
}
if(GetPlayerSkin(playerid) == FEMALE)
{
SetPlayerColor(playerid,COLOR_PINK);
}
if(GetPlayerSkin(playerid) == CIV)
{
SetPlayerColor(playerid,COLOR_BROWN);
}
if(GetPlayerSkin(playerid) == CIVSKIN)
{
SetPlayerColor(playerid,0x19197000);
}
if(GetPlayerSkin(playerid) == SNIP)
{
SetPlayerColor(playerid,0xADFF2F00);
}
}
return 1;
}