anti cheat
This commit is contained in:
@@ -6,6 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Newtonsoft.Json;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Admin;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
@@ -59,6 +60,20 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
}
|
||||
}
|
||||
|
||||
public static void SafeTeleport(this Player player, Vector3 position, float heading = 0, bool spawn = false)
|
||||
{
|
||||
AntiCheat.NoTpAntiCheatForPlayer(player.Name);
|
||||
if (spawn)
|
||||
{
|
||||
NAPI.Player.SpawnPlayer(player, position, heading);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.Position = position;
|
||||
player.Heading = heading;
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetJailTime(this User user, bool killed)
|
||||
{
|
||||
if (user == null)
|
||||
|
||||
Reference in New Issue
Block a user