test
This commit is contained in:
@@ -34,6 +34,39 @@ namespace ReallifeGamemode.Server.Commands
|
||||
{
|
||||
#region Todo
|
||||
|
||||
[Command("test_cuff1")]
|
||||
public void TestCuff1(Player player, string nameOrId)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
Player target = PlayerService.GetPlayerByNameOrId(nameOrId);
|
||||
if (target.Id == player.Id)
|
||||
return;
|
||||
|
||||
Vector3 front = player.GetInFrontOfPosition();
|
||||
front.Z = player.Position.Z;
|
||||
target.Position = front;
|
||||
target.Heading = player.Heading;
|
||||
}
|
||||
|
||||
[Command("test_cuff2")]
|
||||
public void TestCuff2(Player player, string nameOrId)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
Player target = PlayerService.GetPlayerByNameOrId(nameOrId);
|
||||
if (target.Id == player.Id)
|
||||
return;
|
||||
|
||||
target.TriggerEvent("SERVER:GetInFrontOfPlayer", player);
|
||||
}
|
||||
|
||||
[Command("cuff", "~m~Benutzung: ~s~/cuff [ID]")]
|
||||
public void CmdCuffTest(Player player, string nameOrId)
|
||||
{
|
||||
@@ -46,7 +79,10 @@ namespace ReallifeGamemode.Server.Commands
|
||||
if (target.Id == player.Id)
|
||||
return;
|
||||
|
||||
target.Position = player.GetInFrontOfPosition();
|
||||
Vector3 front = player.GetInFrontOfPosition();
|
||||
front.Z = player.Position.Z;
|
||||
|
||||
target.Position = front;
|
||||
target.Heading = player.Heading;
|
||||
|
||||
if (!target.HasAnimation("Cuffed"))
|
||||
|
||||
Reference in New Issue
Block a user