20.07.2017, 23:50
I want only my team players can see my marker and tagname, how to do it? I try but faild...
new playerteam = GetPlayerTeam(playerid); //Storing player team in a variable.
for(new i, j = GetPlayerPoolSize(); i <= j; i++) //Looping through every connected player.
{
if(playerteam == GetPlayerTeam(i)) continue; //If both of the player's team is same, then continue.
SetPlayerMarkerForPlayer(playerid, i, 0); //If not, then Set marker to 'Not show'.
ShowPlayerNameTagForPlayer(playerid, i, 0); //Same with name tag.
}