17.08.2011, 01:55
(
Последний раз редактировалось cruising; 17.08.2011 в 02:40.
)
Hello!
im trying to get markers on the map invisible when connect and/or on spawn, but nothing seams to help
im doing like this
EDIT: forgot to add this here to
and i also have tried this way
nothing seams to help
im trying to get markers on the map invisible when connect and/or on spawn, but nothing seams to help
im doing like this
pawn Код:
public OnGameModeInit()
{
for(new i; i < MAX_PLAYERS; i++)
{
gradar[i] = 0;
}
public OnPlayerConnect(playerid)
{
gradar[playerid] = 0;
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(Member[playerid] != Member[i] && IsPlayerConnected(i)) SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(i) & 0xFFFFFF00));
}
public OnPlayerSpawn(playerid)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(Member[playerid] != Member[i] && IsPlayerConnected(i)) SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(i) & 0xFFFFFF00));
}
pawn Код:
public GangRadar(playerid)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(Member[playerid] != Member[i] && gradar[i] == 1) SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(playerid) & 0xFFFFFF00));
if(Leader[playerid] != Leader[i] && gradar[i] == 1) SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(playerid) & 0xFFFFFF00));
}
}
COMMAND:radar(playerid, params[])
{
if(gradar[playerid] == 0)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(Member[playerid] != Member[i] && IsPlayerConnected(i)) SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(i) & 0xFFFFFF00));
if(Leader[playerid] != Leader[i] && IsPlayerConnected(i)) SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(i) & 0xFFFFFF00));
}
gradar[playerid] = 1;
gradartimer[playerid] = SetTimerEx("GangRadar", 1000, true, "i", playerid);
}
else
{
for(new i; i < MAX_PLAYERS; i++) SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(i));
gradar[playerid] = 0;
KillTimer(gradartimer[playerid]);
}
return 1;
}
pawn Код:
if(Member[playerid] != Member[i] && gradar[i] == 0) SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));