#1

ok im haveing a issue with medics seeing /d iv tried every way i can think off and they cant see it thogh other factions dosee it heres the code


Код:
	if(strcmp(cmd, "/departments", true) == 0 || strcmp(cmd, "/d", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
   		if(IsACop(playerid))
   		{
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/d)epartments [department chat]");
				return 1;
			}
			if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
			{
			  if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Chief %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Captain %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Lieutenant %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Sergeant %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Officer %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Cadet %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else
				{
					format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result);
				}
				SendTeamMessage(1, COLOR_ALLDEPT, string);
				SendTeamMessage(4, COLOR_ALLDEPT, string);
				SendTeamMessage(15, COLOR_ALLDEPT, string);
				RadioLog(string);
				format(string,sizeof(string), "* Officer %s uses his radio.", sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				return 1;
			}
			/*if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
			{
			  if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** STDP Chief %s: %s, over. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** STPD Captain %s: %s, over. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** STPD Lieutenant %s: %s, over. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** STPD Sergeant %s: %s, over. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** STPD Officer %s: %s, over. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** STPD Cadet %s: %s, over. **", sendername, result); }
				else
				{
					format(string, sizeof(string), "** STPD Officer %s: %s, over. **", sendername, result);
				}
				SendTeamMessage(1, COLOR_ALLDEPT, string);
				printf("%s", string);
				return 1;
			}*/
			else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
			{
			  if(PlayerInfo[playerid][pRank] == 9) { format(string, sizeof(string), "** FCA Chief %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
			  else if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** FCA Chief %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
			  else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** FCA Colonel %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
			  else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** FCA Captain %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** FCA Lieutenant%s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** FCA Sergeant %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** FCA Corporal %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** FCA Officer %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** FCA Cadet %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else
				{
					format(string, sizeof(string), "** Intern %s: %s, over. **", sendername, result);
				}
				SendTeamMessage(1, COLOR_ALLDEPT, string);
				SendTeamMessage(1, COLOR_ALLDEPT, string);
				SendTeamMessage(4, COLOR_ALLDEPT, string);
				SendTeamMessage(15, COLOR_ALLDEPT, string);
				RadioLog(string);
				format(string,sizeof(string), "* Officer %s uses his radio.", sendername);
				ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				return 1;
			}
			else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
			{
			  if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** RCSD Sheriff %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
			  else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** RCSD Deputy Sheriff %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** RCSD Commander %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** RCSD Lieutenant %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** RCSD Sergeant %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** RCSD Investigator %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** RCSD Deputy %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** RCSD Explorer %s #%d: %s, over. **", sendername,PlayerInfo[playerid][pBadgeNumber], result); }
				else
				{
					format(string, sizeof(string), "** RCSD Explorer %s: %s, over. **", sendername, result);
				}
				SendTeamMessage(1, COLOR_ALLDEPT, string);
				SendTeamMessage(4, COLOR_ALLDEPT, string);
				SendTeamMessage(15, COLOR_ALLDEPT, string);
				RadioLog(string);
				format(string,sizeof(string), "* Officer %s uses his radio.", sendername);
				ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				return 1;
			}
			else if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4||PlayerInfo[playerid][pMember]==15||PlayerInfo[playerid][pLeader]==15)
			{
				SendTeamMessage(1, COLOR_ALLDEPT, string);
				SendTeamMessage(4, COLOR_ALLDEPT, string);
				SendTeamMessage(15, COLOR_ALLDEPT, string);
    		  RadioLog(string);
  			format(string, sizeof(string), "** Paramedic %s: %s, over. **", sendername, result);
				format(string,sizeof(string), "* Paramedic %s uses his radio.", sendername);
				ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, "  You are not part of a Team !");
				return 1;
			}
			}
		}
		return 1;
	}
Reply
#2

Medics are mostly not part of 'IsACop'
Reply
#3

Add the faction ID for Medics under

IsACop Then do all the rest, its pretty simple
Reply
#4

ok did that and it still ant working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)