pawn Код:
if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pWanted] == 1) return SendClientMessage(playerid, COLOR_GREY, "* Criminals can not go on duty!");
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12 || IsAFreecop(playerid))
{
if(PlayerInfo[playerid][pDBanned] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "* You are Banned from Cop Duty!");
return 1;
}
if (PlayerToPoint(3, playerid,220.4274,74.9089,1005.0391) || PlayerToPoint(3,playerid,1345.89,521.74,1067.76) || PlayerToPoint(3,playerid,1565.35,-1671.68,1723.10) || PlayerToPoint(3,playerid,233.5504,124.9487,1003.2188) || PlayerToPoint(3,playerid,203.5945,1869.5051,13.1406) || PlayerToPoint(3,playerid,-1342.0365,494.2091,11.1953) || PlayerToPoint(3,playerid,-228.5113,980.5826,13.1000) || PlayerInfo[playerid][pLocal] != 255)
{
if(PlayerInfo[playerid][pDuty] == 0)
{
if(IsAFreecop(playerid))
{
format(string, sizeof(string), "* Voluntary Officer %s took a Badge and a Gun from his locker.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
SafeResetPlayerWeapons(playerid);
SafeGivePlayerWeapon(playerid, 41, 150);
SafeGivePlayerWeapon(playerid, 24, 70);
SafeGivePlayerWeapon(playerid, 3, 0);
SetPlayerColor(playerid,COLOR_NEUTRALBLUE);
PlayerInfo[playerid][pDuty] = 1;
PlayerInfo[playerid][pChar] = 71;
new factionskin = PlayerInfo[playerid][pChar];
SetPlayerSkin(playerid, factionskin);
SaveGuns(playerid);
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
SendClientMessage(playerid, COLOR_WHITE, "Type /equip for equipments // Type /undercover to see UC Skins!");
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "* Agent %s took a Badge and a Gun from his locker.", sendername);
SetPlayerColor(playerid,COLOR_WHITE);
SendClientMessage(playerid, COLOR_WHITE, "Type /equip, /agent and /undercover for equipments & Skins!");
}