Cop help
#3

Код:
	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 || IsAFreecop(playerid))
			{
				if(PlayerInfo[playerid][pDBanned] == 1)
				{
					SendClientMessage(playerid, COLOR_GREY, "* You are Banned from Cop Duty!");
					return 1;
				}
				if (IsPlayerInRangeOfPoint(playerid, 6,255.3,77.4,1003.6) || IsPlayerInRangeOfPoint(playerid, 6,223.6328,186.8251,1003.0313) || IsPlayerInRangeOfPoint(playerid, 6, 233.4989,123.6518,1003.2188) || 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,0xa9c4e400);
							PlayerInfo[playerid][pDuty] = 1;
							PlayerInfo[playerid][pChar] = 71;
							new factionskin = PlayerInfo[playerid][pChar];
    						SetPlayerSkin(playerid, 280);
    						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!");
				    		
                            SetPlayerSkin(playerid, 280);
                            SafeGivePlayerWeapon(playerid, 24, 300);
                            SafeGivePlayerWeapon(playerid, 31, 300);
                            SafeGivePlayerWeapon(playerid, 29, 300);
                            SafeGivePlayerWeapon(playerid, 41, 300);
                            SafeGivePlayerWeapon(playerid, 27, 100);
Reply


Messages In This Thread
Cop help - by viddo - 20.01.2012, 09:19
Re: Cop help - by Min - 20.01.2012, 09:25
Re: Cop help - by viddo - 20.01.2012, 09:50
Re: Cop help - by Campbell- - 20.01.2012, 11:15
Re: Cop help - by milanosie - 20.01.2012, 11:17
Re: Cop help - by Tanush123 - 20.01.2012, 11:29
Re: Cop help - by Da' J' - 20.01.2012, 11:31

Forum Jump:


Users browsing this thread: 2 Guest(s)