anti cheat
This commit is contained in:
@@ -390,7 +390,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
player.Vehicle.Position = target.Position;
|
||||
NAPI.Entity.SetEntityVelocity(player.Vehicle, new Vector3());
|
||||
}
|
||||
else player.Position = target.Position;
|
||||
else player.SafeTeleport(target.Position);
|
||||
ChatService.SendMessage(player, "~c~* Du hast dich teleportiert.");
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
target.Vehicle.Position = player.Position;
|
||||
NAPI.Entity.SetEntityVelocity(target.Vehicle, new Vector3());
|
||||
}
|
||||
else target.Position = player.Position;
|
||||
else target.SafeTeleport(player.Position);
|
||||
ChatService.SendMessage(target, "~c~* Du wurdest teleportiert.");
|
||||
}
|
||||
|
||||
@@ -611,7 +611,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
}
|
||||
|
||||
if (player.IsInVehicle && player.VehicleSeat == 0) player.Vehicle.Position = player.GetData<Vector3>("mark");
|
||||
else player.Position = player.GetData<Vector3>("mark");
|
||||
else player.SafeTeleport(player.GetData<Vector3>("mark"));
|
||||
}
|
||||
|
||||
[Command("flip", "")]
|
||||
@@ -648,7 +648,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
}
|
||||
else
|
||||
{
|
||||
player.Position = new Vector3(player.Position.X, player.Position.Y, player.Position.Z + value);
|
||||
player.SafeTeleport(new Vector3(player.Position.X, player.Position.Y, player.Position.Z + value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
}
|
||||
else
|
||||
{
|
||||
player.Position = new Vector3(player.Position.X, player.Position.Y, player.Position.Z - value);
|
||||
player.SafeTeleport(new Vector3(player.Position.X, player.Position.Y, player.Position.Z - value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -686,25 +686,25 @@ namespace ReallifeGamemode.Server.Commands
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X + value, player.Position.Y, player.Position.Z);
|
||||
if (player.IsInVehicle && player.VehicleSeat == 0) player.Vehicle.Position = playerPosition;
|
||||
else player.Position = playerPosition;
|
||||
else player.SafeTeleport(playerPosition);
|
||||
}
|
||||
else if (playerHeading < 315 && playerHeading >= 225)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X, player.Position.Y - value, player.Position.Z);
|
||||
if (player.IsInVehicle && player.VehicleSeat == 0) player.Vehicle.Position = playerPosition;
|
||||
else player.Position = playerPosition;
|
||||
elseplayer.SafeTeleport(playerPosition);
|
||||
}
|
||||
else if (playerHeading >= 135 && playerHeading < 225)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X - value, player.Position.Y, player.Position.Z);
|
||||
if (player.IsInVehicle && player.VehicleSeat == 0) player.Vehicle.Position = playerPosition;
|
||||
else player.Position = playerPosition;
|
||||
else player.SafeTeleport(playerPosition);
|
||||
}
|
||||
else if (playerHeading >= 45 && playerHeading < 135)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X, player.Position.Y + value, player.Position.Z);
|
||||
if (player.IsInVehicle && player.VehicleSeat == 0) player.Vehicle.Position = playerPosition;
|
||||
else player.Position = playerPosition;
|
||||
else player.SafeTeleport(playerPosition);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -723,25 +723,25 @@ namespace ReallifeGamemode.Server.Commands
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X - value, player.Position.Y, player.Position.Z);
|
||||
if (player.IsInVehicle && player.VehicleSeat == 0) player.Vehicle.Position = playerPosition;
|
||||
else player.Position = playerPosition;
|
||||
else player.SafeTeleport(playerPosition);
|
||||
}
|
||||
else if (playerHeading < 315 && playerHeading >= 225)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X, player.Position.Y + value, player.Position.Z);
|
||||
if (player.IsInVehicle && player.VehicleSeat == 0) player.Vehicle.Position = playerPosition;
|
||||
else player.Position = playerPosition;
|
||||
else player.SafeTeleport(playerPosition);
|
||||
}
|
||||
else if (playerHeading >= 135 && playerHeading < 225)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X + value, player.Position.Y, player.Position.Z);
|
||||
if (player.IsInVehicle && player.VehicleSeat == 0) player.Vehicle.Position = playerPosition;
|
||||
else player.Position = playerPosition;
|
||||
else player.SafeTeleport(playerPosition);
|
||||
}
|
||||
else if (playerHeading >= 45 && playerHeading < 135)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X, player.Position.Y - value, player.Position.Z);
|
||||
if (player.IsInVehicle && player.VehicleSeat == 0) player.Vehicle.Position = playerPosition;
|
||||
else player.Position = playerPosition;
|
||||
else player.SafeTeleport(playerPosition);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -976,7 +976,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
player.Vehicle.Position = new Vector3(p.X, p.Y, p.Z);
|
||||
NAPI.Entity.SetEntityVelocity(player.Vehicle, new Vector3());
|
||||
}
|
||||
else player.Position = new Vector3(p.X, p.Y, p.Z);
|
||||
else player.SafeTeleport(new Vector3(p.X, p.Y, p.Z));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1091,7 +1091,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
return;
|
||||
}
|
||||
if (player.IsInVehicle && player.VehicleSeat == 0) player.Vehicle.Position = new Vector3(x, y, z);
|
||||
else player.Position = new Vector3(x, y, z);
|
||||
else player.SafeTeleport(new Vector3(x, y, z));
|
||||
}
|
||||
|
||||
[Command("slap", "~m~Benutzung: ~s~/slap [Spieler] (Höhe)")]
|
||||
@@ -1112,7 +1112,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
|
||||
Vector3 oldPos = target.Position;
|
||||
|
||||
target.Position = new Vector3(oldPos.X, oldPos.Y, oldPos.Z + wert);
|
||||
target.SafeTeleport(new Vector3(oldPos.X, oldPos.Y, oldPos.Z + wert));
|
||||
ChatService.SendMessage(player, "Du hast " + target.Name + " geslappt. Höhe: " + wert + "");
|
||||
}
|
||||
|
||||
@@ -1151,7 +1151,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
player.Position = v.Position.Add(new Vector3(0, 0, 2));
|
||||
player.SafeTeleport(v.Position.Add(new Vector3(0, 0, 2)));
|
||||
}
|
||||
|
||||
[Command("ghv", "~m~Benutzung: ~s~/ghv [Fahrzeug ID]")]
|
||||
@@ -1171,7 +1171,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
}
|
||||
|
||||
v.Position = player.Position;
|
||||
player.Position = player.Position.Add(new Vector3(0, 0, 2));
|
||||
player.SafeTeleport(player.Position.Add(new Vector3(0, 0, 2)));
|
||||
}
|
||||
|
||||
[Command("factionlist", "~m~Benutzung: ~s~/factionlist")]
|
||||
@@ -1443,7 +1443,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
u.Dead = false;
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
NAPI.Player.SpawnPlayer(target, target.Position);
|
||||
target.SafeTeleport(target.Position, 0, true);
|
||||
target.Health = 100;
|
||||
|
||||
Medic.delReviveTask(target);
|
||||
@@ -2184,7 +2184,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
public void sendCPfunc(Player user, int x, int y, int z)
|
||||
{
|
||||
Vector3 pos = new Vector3(x, y, z);
|
||||
user.Position = pos;
|
||||
user.SafeTeleport(pos);
|
||||
}
|
||||
|
||||
[Command("sethandmoney", "~m~Benutzung: ~s~/sethandmoney [Name/ID] [Menge]")]
|
||||
@@ -2414,7 +2414,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
managedPlayer.SendNotification(toPlayerNotification);
|
||||
ChatService.SendMessage(managedPlayer, toPlayerChat);
|
||||
|
||||
NAPI.Player.SpawnPlayer(managedPlayer, managedPlayer.Position);
|
||||
managedPlayer.SafeTeleport(managedPlayer.Position, 0, true);
|
||||
managedPlayer.Health = 100;
|
||||
|
||||
Medic.delReviveTask(managedPlayer);
|
||||
@@ -2671,7 +2671,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
Convert.ToByte(vehicle.PrimaryColor), Convert.ToByte(vehicle.SecondaryColor), business, price);
|
||||
player.SendNotification("Shopfahrzeug ~g~" + vehicle.DisplayName + "~s~ gespeichert.", true);
|
||||
Vector3 oldPos = player.Position;
|
||||
player.Position = new Vector3(oldPos.X, oldPos.Y, oldPos.Z + 2.5);
|
||||
player.SafeTeleport(new Vector3(oldPos.X, oldPos.Y, oldPos.Z + 2.5));
|
||||
}
|
||||
else ChatService.SendMessage(player, "~m~Du sitzt in keinem Fahrzeug!");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user