14.01.2012, 16:52
Alright this part work's the actual issue is the SetPlayerMapIcon is not updating every second as it should.
pawn Код:
CMD:backup(playerid, params[])
{
if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
new string[256];
if(Faction[playerid] != 1) return SendClientMessage(playerid, COLOUR_GREY, "You are not a member of the police.");
if(OnDuty[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You are not on duty.");
foreach(Player, i)
{
if(Faction[i]== Faction[playerid])
{
format(string, sizeof(string), "[Police Message] %s has activated their assistance beacon, please respond immediately.", GetNameEx(playerid));
SendClientMessage(i, COLOUR_GREEN, string);
SetPlayerMarkerForPlayer(playerid, i, COLOUR_BLUE);
SetPlayerMapIcon(i, 1, MAPX[playerid], MAPY[playerid], MAPZ[playerid], 0, COLOUR_BLUE); // ID 1 is POLICE.
Beacon[playerid] = 1;
}
}
return 1;
}
pawn Код:
public BackupUpdate()
{
foreach(Player, i)
{
GetPlayerPos(i, MAPX[i],MAPY[i], MAPZ[i]);
}
return 1;
}