31.10.2009, 02:16
Hi I need help with player markers (SetPlayerMarkerForPlayer & ShowPlayerMarkers)
I want the markers only to show when he is close enough so I put
Although, if the player is on the same team (gTeam) I want the team mates to see their marker globally on the radar.
This is what Ive tried to accomplish..
^That doesnt seem to work though^
Please help.
I want the markers only to show when he is close enough so I put
pawn Код:
ShowPlayerMarkers(2);
This is what Ive tried to accomplish..
pawn Код:
Markers();
pawn Код:
stock Markers()
{
print("i loop didnt start");
for(new i=0; i < GetMaxPlayers(); i++)
{
print("p loop didnt start");
for(new p=0; p < GetMaxPlayers(); p++)
{
print("Cannot find matching team");
if(gTeam[i] == gTeam[p])
{
if(IsPlayerConnected(i))
{
if(IsPlayerConnected(p))
{
if(gTeam[i] == 1 && gTeam[p] == 1)
{
SetPlayerMarkerForPlayer(i, p, LIGHTBLUE);
print("Set matching team 1 players to lightblue marker.");
}
if(gTeam[i] == 2 && gTeam[p] == 2)
{
SetPlayerMarkerForPlayer(p, i, COLOR_RED);
print("Set matching team 2 players to red markers");
}
}
}
}
}
}
}
Please help.