/members command
#1

I'm working on a /members command which displays all of the members in a faction.

This is what I got so far.

Код:
CMD:members(playerid, params[])
{
	if(pInfo[playerid][pGroupRank] == 6 || pInfo[playerid][pGroupRank] == 7)
	{
		new aName[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[256], query[256], rows, fields;
		cache_get_data(rows, fields, mysql);
		GetPlayerName(playerid, aName, sizeof(aName));
		mysql_format(mysql, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Group` = '%d' ORDER BY `GroupRank` DESC", pInfo[playerid][pGroup]);
		mysql_tquery(mysql, query);
		for ( new i, j = cache_get_row_count ( ); i != j; ++i )
		{
		 	pInfo[i][pGroupRank] = cache_get_field_content_int(0, "GroupRank");
			pInfo[i][pGroupDays] = cache_get_field_content_int(0, "GroupDays"); 
			GetPlayerName(i, name, sizeof(name));
			format(string, sizeof(string), "(%d)        %s        %d", pInfo[i][pGroupRank], name, pInfo[i][pGroupDays]);
			ShowPlayerDialog(playerid, DIALOG_MEMBERS, DIALOG_STYLE_LIST, "Rank        Name        Days", string, "Select", "Close");
		}
	}
	else return SendClientMessage(playerid, COLOR_GREY, "You are not the right rank to use this.");
	return 1;
}
How can I make it so when a player clicks a member's name in the dialog it stores the playerid of the selected member in a variable so I can use it later on. Like for another dialog with Uninvite, Faction Warns etc.
Reply
#2

Bumping.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)