Miese Corona Zeiten push für Lenhardt

This commit is contained in:
Siga
2020-05-10 19:19:53 +02:00
parent 15e4cec8ee
commit efbff34c21
159 changed files with 8042 additions and 8695 deletions

View File

@@ -1,12 +1,9 @@
using System;
using System;
using System.Linq;
using GTANetworkAPI;
using ReallifeGamemode.Database;
using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Server.Services;
using ReallifeGamemode.Server.Types;
using ReallifeGamemode.Server.Util;
using ReallifeGamemode.Server.Wanted;
/**
* @overview Life of German Reallife - Event Login (Login.cs)
@@ -16,7 +13,7 @@ using ReallifeGamemode.Server.Wanted;
namespace ReallifeGamemode.Server.Events
{
class Connect : Script
internal class Connect : Script
{
[ServerEvent(Event.PlayerConnected)]
public void OnPlayerConnected(Player player)
@@ -24,7 +21,6 @@ namespace ReallifeGamemode.Server.Events
player.SetData("isLoggedIn", false);
player.Position = new Vector3(-1883.736, -781.4911, -10);
using (var dbContext = new DatabaseContext())
{
if (!dbContext.WhitelistEntries.Any(w => w.SocialClubName.ToLower() == player.SocialClubName.ToLower()))
@@ -41,12 +37,10 @@ namespace ReallifeGamemode.Server.Events
}
}
if (IsPlayerBanned(player)) return;
player.TriggerEvent("SERVER:Login_ShowBrowser");
string msg = "~m~*** " + player.Name + " [" + player.SocialClubName + "] [ID: " + player.Handle.Value + "] (" + player.Address + ")";
ChatService.BroadcastAdmin(msg, AdminLevel.ADMIN);
}
private bool IsPlayerBanned(Player player)