Hitman joining Families
#1

Okay, so I've been trying to work on a small edit so that people in the Hitman Agency can join Families. Before I had edited this, it was set as FBI (and it works, now here's the problem...),

When I try to replace FBI with Hitman, it's the hitman agency.. but when I get in-game with a friend and tell him to invite me as Hitman, it says "This player is already in a family/faction", but If I switch to FBI it allows me to join.. even though the script states that the player is in Faction ID 4 (Hitman) then he will be allowed to join.

Here's what I'm talking about (the command):

Код:
		else if(strcmp(choice,"invite",true) == 0)
		{
			if(!strlen(opstring))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /adjust invite [playerid/partofname]");
				return 1;
			}
			new giveplayerid = ReturnUser(opstring);
			if(IsPlayerConnected(giveplayerid))
			{
				if(giveplayerid != INVALID_PLAYER_ID)
				{
					if(PlayerInfo[giveplayerid][pGang] == 255)
					{
						if(PlayerInfo[giveplayerid][pLeader] == 4 || PlayerInfo[giveplayerid][pFaction] == 4)
						{
							format(string, sizeof(string), "* You've invited %s to join '%s'.",GetPlayerNameEx(giveplayerid), FamilyInfo[family][FamilyName]);
							SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
							format(string, sizeof(string), "* %s has invited you to join '%s'. (type /accept family)",GetPlayerNameEx(playerid), FamilyInfo[family][FamilyName]);
							SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
							InviteFaction[giveplayerid] = 0;
							InviteOffer[giveplayerid] = playerid;
							InviteFamily[giveplayerid] = family;
						}
						if(PlayerInfo[giveplayerid][pLeader] == 0 && PlayerInfo[giveplayerid][pFaction] == 0)
						{
							format(string, sizeof(string), "* You've invited %s to join '%s'.",GetPlayerNameEx(giveplayerid), FamilyInfo[family][FamilyName]);
							SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
							format(string, sizeof(string), "* %s has invited you to join '%s'. (type /accept family)",GetPlayerNameEx(playerid), FamilyInfo[family][FamilyName]);
							SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
							InviteFaction[giveplayerid] = 0;
							InviteOffer[giveplayerid] = playerid;
							InviteFamily[giveplayerid] = family;
							format(string, sizeof(string), "%s invited %s to family %d ", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), family+1);
							Log("logs/family.log", string);
						}
						else
						{
							SendClientMessage(playerid, COLOR_GREY, "That player is already in a family/faction.");
						}
					}
					else
					{
						SendClientMessage(playerid, COLOR_GREY, "That player is already in a family/faction.");
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "Invalid player specified.");
				return 1;
			}
		}
It comes from the command (in a family) "/adjust invite". It's not on the accept side, as the invite doesn't actually go through.. but if you're looking for any other parts, just let me know and I'll paste it for you.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)