formatted code
This commit is contained in:
@@ -9,7 +9,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
public static void InitDatabaseFirstTime()
|
||||
{
|
||||
NAPI.Util.ConsoleOutput("Initializing database...");
|
||||
using(var dbContext = new DatabaseContext())
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
dbContext.Users.FirstOrDefault();
|
||||
dbContext.SaveChanges();
|
||||
|
||||
@@ -9,11 +9,11 @@ namespace ReallifeGamemode.Server.Util
|
||||
public static void CheckFactionBankAccounts()
|
||||
{
|
||||
NAPI.Util.ConsoleOutput("Checking faction bank accounts...");
|
||||
using(var dbContext = new DatabaseContext())
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
foreach(Faction faction in dbContext.Factions)
|
||||
foreach (Faction faction in dbContext.Factions)
|
||||
{
|
||||
if(faction.GetBankAccount(dbContext) == null)
|
||||
if (faction.GetBankAccount(dbContext) == null)
|
||||
{
|
||||
NAPI.Util.ConsoleOutput("Adding bank account for faction: " + faction.Name);
|
||||
FactionBankAccount factionBankAccount = new FactionBankAccount()
|
||||
|
||||
14
ReallifeGamemode.Server/Util/GroupRanks.cs
Normal file
14
ReallifeGamemode.Server/Util/GroupRanks.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
public enum GroupRank
|
||||
{
|
||||
NONE,
|
||||
MEMBER,
|
||||
MANAGER,
|
||||
OWNER
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ using GTANetworkAPI;
|
||||
|
||||
namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
public class ListPlayer
|
||||
public class ListPlayer
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
VehicleSyncData data = GetVehicleSyncData(veh);
|
||||
if (data == default(VehicleSyncData))
|
||||
data = new VehicleSyncData();
|
||||
|
||||
|
||||
data.Engine = status;
|
||||
UpdateVehicleSyncData(veh, data);
|
||||
NAPI.ClientEvent.TriggerClientEventInDimension(veh.Dimension, "VehStream_SetEngineStatus", veh, status);
|
||||
@@ -207,7 +207,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
NAPI.ClientEvent.TriggerClientEventInDimension(veh.Dimension, "VehStream_SetLockStatus", veh, status);
|
||||
NAPI.Pools.GetAllPlayers().ForEach(p =>
|
||||
{
|
||||
if(p.IsInVehicle && p.Vehicle.Handle == veh.Handle)
|
||||
if (p.IsInVehicle && p.Vehicle.Handle == veh.Handle)
|
||||
{
|
||||
p.TriggerEvent("Vehicle_setLockStatus", status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user