Continued faction rank system

This commit is contained in:
hydrant
2018-09-25 21:42:40 +02:00
parent 4402dcc3a3
commit cbc18734ca
14 changed files with 130 additions and 33 deletions

View File

@@ -31,18 +31,14 @@ namespace reallife_gamemode.Server.Services
{
using (var dbCon = new DatabaseContext())
{
foreach (User u in dbCon.Users)
foreach (Client c in NAPI.Pools.GetAllPlayers())
{
Client c = ClientService.GetClientByName(u.Name);
if (c != null)
Faction f = c.GetFaction();
if (f != null)
{
Faction f = c.GetFaction();
if (f != null)
if (factions.Find(fT => fT.Id == f.Id) != null)
{
if (factions.Find(fT => fT.Id == f.Id) != null)
{
c.SendChatMessage(message);
}
c.SendChatMessage(message);
}
}
}