add adminCMD /anim & add UserCMD /hub

This commit is contained in:
michael.reiswich
2021-03-24 22:53:36 +01:00
parent 41b0cf0ac0
commit c0120bfbf5
12 changed files with 36 additions and 11 deletions

View File

@@ -34,6 +34,20 @@ namespace ReallifeGamemode.Server.Commands
{
#region Todo
[Command("anim", "~m~Benutzung: ~s~/anim [animDict] [animName]")]
public void CmdAnim(Player player, string animDict, string animName)
{
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
{
ChatService.NotAuthorized(player);
return;
}
player.PlayAnimation(animDict, animName, (int)(AnimationFlags.Loop | AnimationFlags.OnlyAnimateUpperBody | AnimationFlags.AllowPlayerControl | AnimationFlags.Cancellable));
}
[Command("eat", "~m~Benutzung: ~s~/eat [Item]")]
public void CmdAdminEat(Player player, string item)
{

View File

@@ -189,7 +189,7 @@ namespace ReallifeGamemode.Server.Commands
NAPI.Pools.GetAllPlayers().ForEach(p =>
{
if (p.GetUser()?.FactionLeader ?? false || player.HasData("toglc")) ChatService.SendMessage(p, broadcastMsg);
if (p.GetUser()?.FactionLeader ?? false) ChatService.SendMessage(p, broadcastMsg);
});
}

View File

@@ -81,6 +81,17 @@ namespace ReallifeGamemode.Server.Commands
{
player.TriggerEvent("showUserhelp");
}
[Command("hub")]
public void CmdAnim(Player player)
{
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
{
ChatService.NotAuthorized(player);
return;
}
player.PlayAnimation("mp_am_hold_up", "handsup_base", (int)(AnimationFlags.Loop | AnimationFlags.OnlyAnimateUpperBody | AnimationFlags.AllowPlayerControl | AnimationFlags.Cancellable));
}
}
}

View File

@@ -9,7 +9,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 1;
public override string Name => "Pistol";
public override string Description => "Waffe";
public override int Gewicht => 1180;
public override int Gewicht => 250;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;

View File

@@ -11,7 +11,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 2;
public override string Name => "Pistol50";
public override string Description => "Waffe";
public override int Gewicht => 1180;
public override int Gewicht => 250;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;

View File

@@ -9,7 +9,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 3;
public override string Name => "Pistol_MK2";
public override string Description => "Waffe";
public override int Gewicht => 1180;
public override int Gewicht => 250;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;

View File

@@ -11,7 +11,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 9;
public override string Name => "PumpShotgun";
public override string Description => "Waffe";
public override int Gewicht => 3600;
public override int Gewicht => 500;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;

View File

@@ -11,7 +11,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 5;
public override string Name => "SMG";
public override string Description => "Waffe";
public override int Gewicht => 3080;
public override int Gewicht => 250;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;

View File

@@ -11,7 +11,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 10;
public override string Name => "Schutzweste";
public override string Description => "Waffe";
public override int Gewicht => 3000;
public override int Gewicht => 500;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;

View File

@@ -11,7 +11,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 8;
public override string Name => "SniperRifle";
public override string Description => "Waffe";
public override int Gewicht => 12900;
public override int Gewicht => 500;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;

View File

@@ -9,7 +9,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 11;
public override string Name => "Stungun";
public override string Description => "Waffe";
public override int Gewicht => 1180;
public override int Gewicht => 250;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;

View File

@@ -13,7 +13,7 @@ namespace ReallifeGamemode.Server.WeaponDeal
public class WeaponDealManager : Script
{
private const int WEAPON_AMOUNT_GANG = 2;
private const int WEAPON_AMOUNT_COP = 5;
private const int WEAPON_AMOUNT_COP = 8;
private const int WEAPON_AMOUNT_COP_STUNGUN = 2;
public static bool checkWeaponDbyVehicle(Vehicle vehicle)
{