30.07.2012, 07:53
Hi, Iґm creating now my new gamemode for TDM
I have two team.. and I want to only your team will show on radar.
This is my code in OnPlayerSpawn :
But if I change team from red to blue, i see red players!
I have two team.. and I want to only your team will show on radar.
This is my code in OnPlayerSpawn :
pawn Код:
new pTeam;
pTeam = GetPlayerTeam(playerid);
SetPlayerTeam(playerid, pTeam);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerTeam(i) != pTeam)
{
SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(i) & 0xFFFFFF00));
SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
}
}
}