/backup doesn't show marker -
ajam112 - 01.10.2013
Here is my /backup sytem, it's doesn't a marker.
pawn Код:
CMD:backup(playerid, params[])
{
if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5)
{
if (Backup[playerid] != 1)
{
new
zone[MAX_ZONE_NAME],
string[40 + MAX_PLAYER_NAME];
GetPlayer3DZone(playerid, zone, sizeof(zone));
format(string, sizeof(string), "* %s requests backup over their radio.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
format(string, sizeof(string), "%s is requesting immediate backup at %s.", GetPlayerNameEx(playerid), zone);
Backup[playerid] = 1;
foreach(Player, i)
{
if(gTeam[i] == 2 || IsACop(i))
{
SetPlayerMarkerForPlayer(i, playerid, 0x2641FEAA);
SendClientMessageEx(i, TEAM_BLUE_COLOR, string);
}
}
SendClientMessageEx(playerid, COLOR_WHITE, "Type /nobackup to clear your backup request.");
SetTimerEx("BackupClear", 180000, false, "ii", playerid, 1);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, " You already have an active backup request!");
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You are not a Cop / FBI / Coastguard!");
}
return 1;
}
Re: /backup doesn't show marker -
Konstantinos - 01.10.2013
Make sure in OnGameModeInit exists
Re: /backup doesn't show marker -
ajam112 - 01.10.2013
i have this
pawn Код:
ShowPlayerMarkers(PLAYER_MARKERS_MODE_STREAMED);
Re: /backup doesn't show marker -
Konstantinos - 01.10.2013
That will only show the marker for those who are streamed with the cop who asked for backup. In other words, it will show the marker only to those who are in distance less than 300 meters.
Re: /backup doesn't show marker -
ajam112 - 01.10.2013
i dont understand.. how can i make it every leo's faction can see the marker?
Re: /backup doesn't show marker -
Konstantinos - 01.10.2013
Just change
pawn Код:
ShowPlayerMarkers(PLAYER_MARKERS_MODE_STREAMED);
to
and the marker will be show for those who are cop or team 2 according to this line.
pawn Код:
if(gTeam[i] == 2 || IsACop(i))
I don't know which are leo's factions.
Re: /backup doesn't show marker -
ajam112 - 01.10.2013
this all is a leo
pawn Код:
if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5)
But i dont know about gTeam
Re: /backup doesn't show marker -
Konstantinos - 01.10.2013
Then use the above line instead of only team 2 and cop.
Re: /backup doesn't show marker -
ajam112 - 01.10.2013
how about like this?
pawn Код:
PlayerInfo[playerid][pMember] == 3
Re: /backup doesn't show marker -
Konstantinos - 01.10.2013
What exactly do you ask me? You use that gamemode, you should know what the factions are.
I've no idea.