Help me with this adminoffduty cmd please
#1

Hi to all, i have cmd for admins that they can go onduty. when some admin go onduty his name become blue, and blue marker shown on map. That is ok and good, but...when admin go offduty, his name become white ( normal like all names ) but on radar he is marked with white color. What to edit in this cmd that when admin go offduty he disapire on radar, and become like all playres unvisable on radar?

here is cmd for admin on and off duty

Код:
if (strcmp(cmd,"/adminonduty",true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
        new sMsg[ 128 ];
        GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
        SetPlayerColor( playerid, COLOR_DBLUE );
        SetPlayerHealth(playerid, 250);
     		SetPlayerArmour(playerid, 250);
        format( sMsg, sizeof( sMsg ), "*Admin %s is onduty.", sMsg );
        SendClientMessageToAll( COLOR_LIGHTGREEN, sMsg );
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  NOT ADMIN");
			}
		}
		return 1;
	}
	if (strcmp(cmd,"/adminoffduty",true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
        new sMsg[ 128 ];
        GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
        SetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 0);
        format( sMsg, sizeof( sMsg ), "*Admin %s is offduty.", sMsg );
        SendClientMessageToAll( COLOR_LIGHTRED, sMsg );
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  NOT ADMIN");
			}
		}
		return 1;
	}
What to edit?
Reply
#2

Looks right too me, does it work or errors? whats the matter
Reply
#3

Problem is that when admin type /adminoffduty he is still marked on radar but not with blue color like he is ondutym, now he is market white color...i want that he type /adminonduty that he disapeare from radar and players cant see his positions...hot to do this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)