16.05.2014, 14:47
Hey,how can i make if player has the same team as the other one it creates a marker on him ,and where to put the code at?
public OnPlayerSpawn(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++) //foreach is better
{
if(!IsPlayerConnected(i)) continue;
SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(i) & ((GetPlayerTeam(i) == GetPlayerTeam(playerid)) ? (0x000000FF) : (0xFFFFFF00))));
SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & ((GetPlayerTeam(playerid) == GetPlayerTeam(i)) ? (0x000000FF) : (0xFFFFFF00))));
}
return 1;
}