Й, tu usa a funзгo SetPlayerMarkerForPlayer com um timer (e 2 loops de jogadores nele) que checa se os jogadores estгo no raio que tu quer do outro jogador, usando IsPlayerInRangeOfPoint.
Exemplo:
pawn Code:
new bool:MarcadorStatus[MAX_PLAYERS][MAX_PLAYERS];
new Time[MAX_PLAYERS];
#define zumbi 1
#define civil 2
#define COR_ZUMBI cor
#define COR_ZUMBI_INVISIVEL cor
#define COR_CIVIL cor
#define COR_CIVIL_INVISIVEL cor
SetTimer("VerificarMarcadores", 1000, 1);
forward VerificarMarcadores();
#define AlterarMarcStatus(%1,%2) MarcadorStatus[%1][%2] = false; if(Time[%2] == zumbi) SetPlayerMarkerForPlayer(%1, %2, COR_ZUMBI_INVISIVEL); \
else if(Time[%2] == civil) SetPlayerMarkerForPlayer(%1, %2, COR_CIVIL_INVISIVEL)
public VerificarMarcadores()
{
new Float:x, Float:y, Float:z;
for(new j1; ji < MAX_PLAYERS; j1++)
{
if(IsPlayerConnected(j1))
{
for(new j2; j2 < MAX_PLAYER; j2++)
{
if(IsPlayerConnected(j2))
{
if(Time[j1] == zumbi) // sу 'zumbi' pode ver os outros
{
GetPlayerPos(j2, x, y, z);
if(IsPlayerInRangeOfPoint(j1, 20.0, x, y, z)) // onde 20 й o raio para visualizar o outro jogador
{
if(Time[j2] == zumbi) SetPlayerMarkerForPlayer(j1, j2, COR_ZUMBI);
else if(Time[j2] == civil) SetPlayerMarkerForPlayer(j1, j2, COR_CIVIL);
MarcadorStatus[j1][j2] = true;
}
else
{
if(MarcadorStatus[j1][j2])
{
AlterarMarcStatus(j1, j2);
}
}
}
else
{
if(MarcadorStatus[j1][j2])
{
AlterarMarcStatus(j1, j2);
}
}
}
}
}
}
}
Nгo testei, fiz meio as pressas porque jб estou saindo.
Boa sorte.