[HELP] Families
#1

I got this /families command that shows the list of all families.
Is it possible to make /families auto update? like if someone joins it updates the list by it self?

and that i can do /families (Familienumber)
then it shows the online members in the familie
THANKS
Reply
#2

Show some code
Reply
#3

show the codE!!!!
Reply
#4

without codes we cant help
Reply
#5

Код:
	if(strcmp(cmd, "/families", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
			  new number = 0;
		    for (i = 0; i < sizeof(FamilyInfo); i++)
		    {
		      number ++;
		      format(string, sizeof(string), "Family %d| Name: %s | Leader: %s | Members: %d.",number,FamilyInfo[i][FamilyName],FamilyInfo[i][FamilyLeader],FamilyInfo[i][FamilyMembers]);
		      if (FamilyInfo[i][FamilyTaken]) SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    return 1;
	    }
	    new family = strval(tmp);
	    if(family < 1 || family > MAX_FAMILY)
				{
				format(string, sizeof(string), "FamilyNr can't be below 1 or above %d!", MAX_FAMILY);
				SendClientMessage(playerid, COLOR_GREY, string);
				return 1;
				}
			family -= 1;
			if(FamilyInfo[family][FamilyTaken] != 1)
			{
			  SendClientMessage(playerid, COLOR_GREY, "  That FamilyNr hasn't been Taken yet!");
			  return 1;
			}
			for (i = 0; i < MAX_PLAYERS; i++)
			{
			  if(IsPlayerConnected(i))
			  {
			    if(PlayerInfo[i][pFMember] == family)
			    {
			      GetPlayerName(i, giveplayer, sizeof(giveplayer));
			      format(string, sizeof(string), "* Family %d: %s | Rank: %d.",family,giveplayer,PlayerInfo[i][pRank]);
			      SendClientMessage(playerid, COLOR_GREY, string);
			    }
			  }
			}
	  }
	  return 1;
There
Reply
#6

As far as I remember, the FamilyInfo vars are updated in GF when you /family invite. If not, make it happen. Increase the FamilyMembers stat when someone accepts the invitation. That way it'll be up to date.
Reply
#7

Do i always have to open navicat and add the new members who join?
Its so hard. Isnt there a way to make it auto update?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)