Code formatiert
This commit is contained in:
@@ -113,7 +113,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
if (Economy.Paychecks.ContainsKey(u.Id)) paycheck = Economy.Paychecks[u.Id];
|
||||
|
||||
Licenses licenses = new Licenses(u.DriverLicenseVehicle, u.DriverLicenseBike, u.FlyingLicensePlane);
|
||||
|
||||
|
||||
var accountData = new
|
||||
{
|
||||
regDate = u.RegistrationDate.ToShortDateString(),
|
||||
@@ -140,7 +140,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
if (!player.IsLoggedIn()) return;
|
||||
var user = player.GetUser();
|
||||
|
||||
|
||||
|
||||
if (user?.FactionId != null)
|
||||
{
|
||||
@@ -245,13 +245,13 @@ namespace ReallifeGamemode.Server.Events
|
||||
|
||||
using (var context = new DatabaseContext())
|
||||
{
|
||||
|
||||
|
||||
|
||||
List<UserItem> fItem = context.UserItems.Where(u => u.UserId == user.Id).ToList();
|
||||
foreach(var item in fItem)
|
||||
foreach (var item in fItem)
|
||||
{
|
||||
IItem iItem = InventoryManager.GetItemById(item.ItemId);
|
||||
if(iItem is IWeaponDealItem obj)
|
||||
if (iItem is IWeaponDealItem obj)
|
||||
{
|
||||
FactionWeapon weapon = context.FactionWeapons.Where(w => w.FactionId == user.FactionId && w.WeaponModel == iItem.Name).FirstOrDefault();
|
||||
if (weapon == null)
|
||||
@@ -267,7 +267,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
Database.Entities.Faction faction = context.Factions.Where(fac => fac.Id == user.FactionId).FirstOrDefault();
|
||||
|
||||
if (faction.WeaponDealTime > 0)
|
||||
dealTime = "noch " + faction.WeaponDealTime.ToString()+" min. übrig";
|
||||
dealTime = "noch " + faction.WeaponDealTime.ToString() + " min. übrig";
|
||||
|
||||
timer.Add(dealTime);
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
player.TriggerEvent("showWeaponMenu", primarys.ToArray(), secondarys.ToArray(), melees.ToArray(), specials.ToArray(), JsonConvert.SerializeObject(timer.ToArray()));
|
||||
}
|
||||
if (nearestJailReleasePoint != null)
|
||||
@@ -309,16 +309,16 @@ namespace ReallifeGamemode.Server.Events
|
||||
if (c.JailTime > 0)
|
||||
{
|
||||
criminals.Add(c.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.TriggerEvent("showJailMenu", JsonConvert.SerializeObject(criminals.ToArray()));
|
||||
}
|
||||
if (nearestElevatorPoint != null)
|
||||
{
|
||||
List<string> stages = new List<string>();
|
||||
foreach(var e in PositionManager.ElevatorPoints)
|
||||
foreach (var e in PositionManager.ElevatorPoints)
|
||||
{
|
||||
if(e.Position.DistanceTo2D(player.Position) <= 25 && e.Position.DistanceTo(player.Position) > 1.5)
|
||||
if (e.Position.DistanceTo2D(player.Position) <= 25 && e.Position.DistanceTo(player.Position) > 1.5)
|
||||
{
|
||||
stages.Add(e.Stage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user