Finish Cuff using AnimationSync
+ Added Command /cuff for LSPD and FIB (Wanteds can also be cuffed using the Interaction key). + Added Command /syncanim for Supporter * Player can now use CTRL + H to hup (/hup still usable) * Cuffs break after two minutes. TODO: - Players in Animation cannot enter Vehicle as driver neither can drive them. - Cuffed players will not loose their cuffs after reconnect.
This commit is contained in:
@@ -34,33 +34,6 @@ namespace ReallifeGamemode.Server.Commands
|
||||
{
|
||||
#region Todo
|
||||
|
||||
[Command("cuff", "~m~Benutzung: ~s~/cuff [ID]")]
|
||||
public void CmdCuffTest(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.SetInFrontOf(player);
|
||||
target.Heading = player.Heading;
|
||||
|
||||
if (!target.HasAnimation("Cuffed"))
|
||||
{
|
||||
player.SyncAnimation("doArrest");
|
||||
target.SyncAnimation(new List<string>() { "getArrest", "Cuffed" });
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SyncAnimation("doUncuff");
|
||||
target.SyncAnimation("getUncuff");
|
||||
}
|
||||
}
|
||||
|
||||
[Command("syncanim", "~m~Benutzung: ~s~/syncanim [animName]")]
|
||||
public void CmdSyncAnim(Player player, string animName = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user