/gov Chat Bug
#1

Once a member in the current factions type /gov, it mentions "You are not in a goverment faction"
i cant really pinpoint the error at the moment
Also, Can you make it so that Members in Faction ID 7 can also gov? Thanks
Код:
//----------------------------------[government]-----------------------------------------------
	if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if(gTeam[playerid] != 2 || PlayerInfo[playerid][pLeader] != 7 || PlayerInfo[playerid][pLeader] != 11)
			{
//			  if(PlayerInfo[playerid][pLeader] != 7 || PlayerInfo[playerid][pLeader] != 11 || PlayerInfo[playerid][pMember] != 11)
//			  {
   
        SendClientMessage(playerid, COLOR_GREY, "  You are not in a Government Faction !");
        return 1;
//				}
			}
			if(PlayerInfo[playerid][pRank] < 6)
			{
			  SendClientMessage(playerid, COLOR_GREY, "  You need to be Rank 6 to be able to use this !");
			  return 1;
			}
			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: (/gov)ernment [text]");
				return 1;
			}
			SendClientMessageToAll(COLOR_WHITE, "|___________ Government News Announcement ___________|");
			if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
			{
				if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "LAPD Chief %s: %s", sendername, result); }
			  else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "LAPD Deputy Chief %s: %s", sendername, result); }
			  else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "LAPD Captain %s: %s", sendername, result); }
				SendClientMessageToAll(COLOR_BLUE, string);
			}
			else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
			{
				format(string, sizeof(string), "F.B.I Agent %s: %s", sendername, result);
				SendClientMessageToAll(TEAM_BLUE_COLOR, string);
			}
			else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
			{
				format(string, sizeof(string), "Soldier %s: %s", sendername, result);
				SendClientMessageToAll(COLOR_GREEN, string);
			}
			else if(PlayerInfo[playerid][pMember] == 7 (PlayerInfo[playerid][pLeader] == 7)
			{
				format(string, sizeof(string), "President %s: %s", sendername, result);
				SendClientMessageToAll(TEAM_ORANGE_COLOR, string);
			}
			else if(PlayerInfo[playerid][pLeader] == 11)
			{
				format(string, sizeof(string), "Firefighter %s: %s", sendername, result);
				SendClientMessageToAll(COLOR_FIREMAN, string);
			}
		}
		return 1;
	}
Reply
#2

bump
Reply
#3

bump
Reply
#4

http://forum.sa-mp.com/index.php?topic=87043.0
Reply
#5

Quote:
Originally Posted by Weirdosport
I'm very sorry, but i need this urgently.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)