ShowPlayerMarkerForPlayer problem -
[BLS]Touchdown - 08.08.2011
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.
Re: ShowPlayerMarkerForPlayer problem -
Jafet_Macario - 08.08.2011
Use
This shows all players on radar
This shows only near people on radar
This shows no player on the radar
AW: ShowPlayerMarkerForPlayer problem -
[BLS]Touchdown - 08.08.2011
You dont understand. I want it that you can see your teammates, but you cant see enemies
AW: ShowPlayerMarkerForPlayer problem -
[BLS]Touchdown - 08.08.2011
no one knows ... ? I want that you can see your teammates on the radar, but you cant see enemies on radar
Re: ShowPlayerMarkerForPlayer problem -
OwlCity - 08.08.2011
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;
}
AW: ShowPlayerMarkerForPlayer problem -
[BLS]Touchdown - 08.08.2011
I want that they keep their colors ...