ShowPlayerMarkerForPlayer problem
#1

hey guys,
i got some problems with this code:

Код:
public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == TEAM_BLUE) {
	    TeamBlueSettings(playerid);
    	//labelblue[playerid] = Create3DTextLabel("Team Blue",COLOR_WHITE, 30.0, 40.0, 50.0, 40.0, 0);
		//Attach3DTextLabelToPlayer(labelblue[playerid],playerid,0.0, 0.0, 0.7);
	}
	if(gTeam[playerid] == TEAM_RED) {
	    TeamRedSettings(playerid);
    	//labelred[playerid] = Create3DTextLabel("Team Red",COLOR_WHITE, 30.0, 40.0, 50.0, 40.0, 0);
		//Attach3DTextLabelToPlayer(labelred[playerid],playerid,0.0, 0.0, 0.7);
	}
	Spawned[playerid] = 1;
	for(new i;i<MAX_PLAYERS;i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(Spawned[i] == 1)
	        {
	            if(gTeam[i] == gTeam[playerid])
	            {
	                SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(i));
	                SetPlayerMarkerForPlayer(i, playerid, GetPlayerColor(playerid));
				}
				else
				{
				    SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(i) & 0xFFFFFF00);
				    SetPlayerMarkerForPlayer(i, playerid, GetPlayerColor(playerid) & 0xFFFFFF00);
				}
			}
		}
	}
        return 1;
}
When the player is spawned, he can see ALL players on radar.

Please help me.
Reply
#2

Use
pawn Код:
ShowPlayerMarkers(1);
This shows all players on radar
pawn Код:
ShowPlayerMarkers(2);
This shows only near people on radar
pawn Код:
ShowPlayerMarkers(0);
This shows no player on the radar
Reply
#3

You dont understand. I want it that you can see your teammates, but you cant see enemies
Reply
#4

no one knows ... ? I want that you can see your teammates on the radar, but you cant see enemies on radar
Reply
#5

Well, if you want this:

"I want it that you can see your teammates, but you cant see enemies"

You have to explain that in the first post and don't say that we didn't understand you.

Try that:

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == TEAM_BLUE) {
        TeamBlueSettings(playerid);
        //labelblue[playerid] = Create3DTextLabel("Team Blue",COLOR_WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        //Attach3DTextLabelToPlayer(labelblue[playerid],playerid,0.0, 0.0, 0.7);
    }
    if(gTeam[playerid] == TEAM_RED) {
        TeamRedSettings(playerid);
        //labelred[playerid] = Create3DTextLabel("Team Red",COLOR_WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        //Attach3DTextLabelToPlayer(labelred[playerid],playerid,0.0, 0.0, 0.7);
    }
    Spawned[playerid] = 1;
    for(new i;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            if(Spawned[i] == 1)
            {
                if(gTeam[i] == gTeam[playerid])
                {
                    SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(i));
                    SetPlayerMarkerForPlayer(i, playerid, GetPlayerColor(playerid));
                }
                else
                {
                    SetPlayerMarkerForPlayer(playerid, i,  0xFFFFFF00);
                    SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
                }
            }
        }
    }
        return 1;
}
Reply
#6

I want that they keep their colors ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)