SA-MP Forums Archive
[HELP] Families - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Families (/showthread.php?tid=143691)



[HELP] Families - andershh - 24.04.2010

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


Re: [HELP] Families - [HiC]TheKiller - 24.04.2010

Show some code


Re: [HELP] Families - DiddyBop - 24.04.2010

show the codE!!!!


Re: [HELP] Families - Onyx09 - 24.04.2010

without codes we cant help


Re: [HELP] Families - andershh - 24.04.2010

Код:
	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


Re: [HELP] Families - Harry_Gaill - 24.04.2010

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.


Re: [HELP] Families - andershh - 24.04.2010

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?