Add AdminLevel.cs, ClientExtention.cs
This commit is contained in:
20
Server/Extensions/ClientExtension.cs
Normal file
20
Server/Extensions/ClientExtension.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using GTANetworkAPI;
|
||||
using reallife_gamemode.Model;
|
||||
using reallife_gamemode.Server.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace reallife_gamemode.Server.Extensions
|
||||
{
|
||||
public static class ClientExtension
|
||||
{
|
||||
public static User GetUser(this Client client)
|
||||
{
|
||||
using(DatabaseContext dbContext = new DatabaseContext())
|
||||
{
|
||||
return dbContext.Users.Find(client.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Server/Util/AdminLevel.cs
Normal file
13
Server/Util/AdminLevel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace reallife_gamemode.Server.Util
|
||||
{
|
||||
public enum AdminLevel : int
|
||||
{
|
||||
PLAYER,
|
||||
SUPPORTER,
|
||||
ADMIN
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user