SA-MP Forums Archive
/onduty show admin marker on map. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /onduty show admin marker on map. (/showthread.php?tid=71851)



/onduty show admin marker on map. - sandsnake - 04.04.2009

Well the problem is i want to show the admin on map without showing the players on map

To show the admin on map i will use command /onduty
PawnCode
Quote:

//----------------Admin on Duty // --------------------------------//
if(strcmp(cmd, "/onduty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
AdminDuty[playerid] = 1;
SetPlayerArmour(playerid, 999);
SetPlayerHealth(playerid, 999);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "Admin On Duty");
format(string, sizeof(string), "Admin %s is On Duty, Please /pme if you need help", sendername);
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerColor(playerid, COLOR_YELLOW); // Orange
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
}
}
return 1;
}
//----------------Admin Off Duty // --------------------------------//
if(strcmp(cmd, "/offduty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
AdminDuty[playerid] = 0;
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 99);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "Admin Off Duty");
format(string, sizeof(string), "Admin %s is Off Duty, Please do not /pme", sendername);
SendClientMessageToAll(COLOR_BLUE, string);
SetPlayerColor(playerid, COLOR_WHITE);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
}
}
return 1;
}

Please can someone help me ?


Re: /onduty show admin marker on map. - MenaceX^ - 04.04.2009

SetPlayerMarkerForPlayer


Re: /onduty show admin marker on map. - sandsnake - 04.04.2009

yea but appear all players .... :X


Re: /onduty show admin marker on map. - Pyrokid - 04.04.2009

Why don't you just give Admins an original marker color, like purple or pink, on the map?


Re: /onduty show admin marker on map. - MenaceX^ - 04.04.2009

Quote:
Originally Posted by sandsnake
yea but appear all players .... :X
Use a loop.


Re: /onduty show admin marker on map. - Tr1viUm - 04.04.2009

Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
  if(!IsPlayerConnected(i))
    continue;
  SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
}