/duty problem
#3

Код:
if(!strcmp("/duty", cmdtext, true))
{
    // if the player isnt logged into rcon , it will send the below message (change it to your desire)
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Invalid Command.  Type /commands For A List Of Commands.");
    new OnDuty[MAX_PLAYERS];
    new admin_name[MAX_PLAYER_NAME], Message[128];
    if(OnDuty[playerid] == 0)
    {
          GameTextForPlayer(playerid, "~w~ On Duty", 5000, 5);
          SetPlayerSkin(playerid,217); // set your desired skin here
          format(Message, sizeof(Message), "%s (%d) Is An Admin On Duty,Attacking Him Will Lead To Punishment!", admin_name, playerid), SendClientMessageToAll(0xFF9900AA, Message);
	  SetPlayerHealth(playerid,100000);
	  SetPlayerTeamColor(playerid);
	  GivePlayerWeapon(playerid,38,133337);
          OnDuty[playerid] = 1;
    }
    else
    {
          GameTextForPlayer(playerid, "~r~ Off Duty", 5000, 5);
          SetPlayerSkin(playerid,217); // set your desired skin here
          format(Message, sizeof(Message), "%s (%d) Is An Admin Off Duty.", admin_name, playerid), SendClientMessageToAll(0xFF9900AA, Message);
	  SetPlayerHealth(playerid,100);
	  SetPlayerTeamColor(playerid);
	  ResetPlayerWeapons(playerid);
          OnDuty[playerid] = 0;
    }
    return 1;
  }
  return 0;
}
Reply


Messages In This Thread
/duty problem - by Youssef214 - 02.02.2014, 12:49
Re: /duty problem - by Konstantinos - 02.02.2014, 12:54
AW: /duty problem - by ReD_HunTeR - 02.02.2014, 12:55
Re: /duty problem - by Youssef214 - 02.02.2014, 13:02
AW: /duty problem - by ReD_HunTeR - 02.02.2014, 13:03
Re: /duty problem - by Youssef214 - 02.02.2014, 13:08

Forum Jump:


Users browsing this thread: 1 Guest(s)