anti cheat
This commit is contained in:
@@ -33,12 +33,16 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
player.Armor = 0;
|
||||
Random rnd = new Random();
|
||||
int rndInt = rnd.Next(1, 3);
|
||||
Vector3 position = new Vector3();
|
||||
if (rndInt == 1)
|
||||
NAPI.Player.SpawnPlayer(player, new Vector3(458.9842, -997.2126, 24.91485)); //send client to jail
|
||||
position = new Vector3(458.9842, -997.2126, 24.91485); //send client to jail
|
||||
if (rndInt == 2)
|
||||
NAPI.Player.SpawnPlayer(player, new Vector3(459.696, -994.3766, 24.91486)); //send client to jail
|
||||
position = new Vector3(459.696, -994.3766, 24.91486); //send client to jail
|
||||
if (rndInt == 3)
|
||||
NAPI.Player.SpawnPlayer(player, new Vector3(458.3372, -1001.258, 24.91485)); //send client to jail
|
||||
position = new Vector3(458.3372, -1001.258, 24.91485); //send client to jail
|
||||
|
||||
player.SafeTeleport(position, 0, true);
|
||||
|
||||
Jailtime[user.Id] = user.JailTime; // 54 sec for each wanted star -> in total 45min for 50 Wanteds
|
||||
int timeMinutes;
|
||||
|
||||
@@ -135,7 +139,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
if (user.JailTime <= 0)
|
||||
{
|
||||
Jailtime.Remove(user.Id);
|
||||
player.Position = new Vector3(427.879, -984.65, 30.71);
|
||||
player.SafeTeleport(new Vector3(427.879, -984.65, 30.71));
|
||||
player.TriggerEvent("jailTime", 0);
|
||||
return;
|
||||
}
|
||||
@@ -179,7 +183,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
player.Health = 100;
|
||||
player.Position = new Vector3(427.879, -984.65, 30.71);
|
||||
player.SafeTeleport(new Vector3(427.879, -984.65, 30.71));
|
||||
|
||||
ChatService.HQMessage("!{#8181E9}HQ: Beamter " + cop.Name + " hat " + user.Name + " aus dem Knast entlassen.");
|
||||
ChatService.SendMessage(player, "!{#8181E9}Der Beamte " + cop.Name + " hat dich aus dem Knast entlassen");
|
||||
@@ -199,7 +203,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
dbContext.SaveChanges();
|
||||
|
||||
target.Health = 100;
|
||||
target.Position = new Vector3(427.879, -984.65, 30.71);
|
||||
target.SafeTeleport(new Vector3(427.879, -984.65, 30.71));
|
||||
|
||||
ChatService.HQMessage(" Admin " + admin.Name + " hat " + user.Name + " aus dem Knast entlassen.");
|
||||
ChatService.SendMessage(target, "!{#8181E9}Admin " + admin.Name + " hat dich aus dem Knast entlassen");
|
||||
|
||||
Reference in New Issue
Block a user