/onduty show admin marker on map.
#1

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 ?
Reply
#2

SetPlayerMarkerForPlayer
Reply
#3

yea but appear all players .... :X
Reply
#4

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)