Fraktionsmitgliederliste eingebaut inkl. uninvite für Leader
This commit is contained in:
@@ -135,6 +135,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
Price = f.BuyPrice
|
||||
});
|
||||
|
||||
|
||||
Paycheck paycheck = null;
|
||||
if (Economy.Paychecks.ContainsKey(u.Id)) paycheck = Economy.Paychecks[u.Id];
|
||||
|
||||
@@ -169,6 +170,15 @@ namespace ReallifeGamemode.Server.Events
|
||||
wage = u.Wage,
|
||||
};
|
||||
|
||||
var memberList = dbContext.Users.Where(f => f.FactionId == u.FactionId && u.FactionId != 0).OrderByDescending(f => f.FactionRank.Order).ThenBy(f => f.Name).Select(m => new
|
||||
{
|
||||
username = m.Name,
|
||||
factionRank = m.FactionRank.Order,
|
||||
factionRankName = m.FactionRank.RankName,
|
||||
isLeader = m.FactionLeader,
|
||||
isOnline = m.Player.IsLoggedIn(),
|
||||
});
|
||||
|
||||
string faction = u.Faction?.Name ?? "Zivilist";
|
||||
string factionleader = u.FactionLeader ? u.Faction.Name : null;
|
||||
string group = u.Group != null ? u.Group.Name : null;
|
||||
@@ -193,8 +203,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
pay_amount = player.GetData<int>("pay_amount");
|
||||
}
|
||||
|
||||
player.TriggerEvent("SERVER:InteractionMenu_OpenMenu", JsonConvert.SerializeObject(accountData), factionleader, JsonConvert.SerializeObject(jobData), faction, group, factionInvite, groupInvite, ticket_boolean, ticket_amount, pay_amount, house);
|
||||
player.TriggerEvent("SERVER:InteractionMenu_OpenMenu", JsonConvert.SerializeObject(accountData), factionleader, JsonConvert.SerializeObject(memberList), JsonConvert.SerializeObject(jobData), faction, group, factionInvite, groupInvite, ticket_boolean, ticket_amount, pay_amount, house);
|
||||
}
|
||||
|
||||
[RemoteEvent("keyPress:E")]
|
||||
|
||||
Reference in New Issue
Block a user