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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user