From c0120bfbf5c02d61426af6738653c7dbf31408d4 Mon Sep 17 00:00:00 2001 From: "michael.reiswich" Date: Wed, 24 Mar 2021 22:53:36 +0100 Subject: [PATCH] add adminCMD /anim & add UserCMD /hub --- .../Commands/AdminCommands.cs | 16 +++++++++++++++- .../Commands/FactionCommands.cs | 2 +- ReallifeGamemode.Server/Commands/UserCommands.cs | 11 +++++++++++ .../Inventory/Items/Pistol.cs | 2 +- .../Inventory/Items/Pistol50.cs | 2 +- .../Inventory/Items/Pistolmk2.cs | 2 +- .../Inventory/Items/PumpShotgun.cs | 2 +- ReallifeGamemode.Server/Inventory/Items/SMG.cs | 2 +- .../Inventory/Items/Schutzweste.cs | 2 +- .../Inventory/Items/SniperRifle.cs | 2 +- .../Inventory/Items/Stungun.cs | 2 +- .../WeaponDeal/WeaponDealManager.cs | 2 +- 12 files changed, 36 insertions(+), 11 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 7daa6ed7..0b734b73 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -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) { @@ -208,7 +222,7 @@ namespace ReallifeGamemode.Server.Commands #region Support - [Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~ip~s~, ~g~deathlogs~s~,~g~lc~s~", GreedyArg = true)] + [Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~ip~s~, ~g~deathlogs~s~, ~g~lc~s~", GreedyArg = true)] public void CmdTog(Player player, string typ, string option1 = null, string option2 = null) { if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index 785cdb13..10c7ab4a 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -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); }); } diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index a8c86ee3..4d241138 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -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)); + } } } diff --git a/ReallifeGamemode.Server/Inventory/Items/Pistol.cs b/ReallifeGamemode.Server/Inventory/Items/Pistol.cs index 03072cdf..f5182142 100644 --- a/ReallifeGamemode.Server/Inventory/Items/Pistol.cs +++ b/ReallifeGamemode.Server/Inventory/Items/Pistol.cs @@ -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; diff --git a/ReallifeGamemode.Server/Inventory/Items/Pistol50.cs b/ReallifeGamemode.Server/Inventory/Items/Pistol50.cs index cfe9a85c..38ff472b 100644 --- a/ReallifeGamemode.Server/Inventory/Items/Pistol50.cs +++ b/ReallifeGamemode.Server/Inventory/Items/Pistol50.cs @@ -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; diff --git a/ReallifeGamemode.Server/Inventory/Items/Pistolmk2.cs b/ReallifeGamemode.Server/Inventory/Items/Pistolmk2.cs index 078a8527..45bc30d8 100644 --- a/ReallifeGamemode.Server/Inventory/Items/Pistolmk2.cs +++ b/ReallifeGamemode.Server/Inventory/Items/Pistolmk2.cs @@ -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; diff --git a/ReallifeGamemode.Server/Inventory/Items/PumpShotgun.cs b/ReallifeGamemode.Server/Inventory/Items/PumpShotgun.cs index 9e241c4d..f7409374 100644 --- a/ReallifeGamemode.Server/Inventory/Items/PumpShotgun.cs +++ b/ReallifeGamemode.Server/Inventory/Items/PumpShotgun.cs @@ -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; diff --git a/ReallifeGamemode.Server/Inventory/Items/SMG.cs b/ReallifeGamemode.Server/Inventory/Items/SMG.cs index f2efad29..a1966ab3 100644 --- a/ReallifeGamemode.Server/Inventory/Items/SMG.cs +++ b/ReallifeGamemode.Server/Inventory/Items/SMG.cs @@ -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; diff --git a/ReallifeGamemode.Server/Inventory/Items/Schutzweste.cs b/ReallifeGamemode.Server/Inventory/Items/Schutzweste.cs index d51c8d2b..bc9871f7 100644 --- a/ReallifeGamemode.Server/Inventory/Items/Schutzweste.cs +++ b/ReallifeGamemode.Server/Inventory/Items/Schutzweste.cs @@ -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; diff --git a/ReallifeGamemode.Server/Inventory/Items/SniperRifle.cs b/ReallifeGamemode.Server/Inventory/Items/SniperRifle.cs index f9c3739d..dde2d0e2 100644 --- a/ReallifeGamemode.Server/Inventory/Items/SniperRifle.cs +++ b/ReallifeGamemode.Server/Inventory/Items/SniperRifle.cs @@ -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; diff --git a/ReallifeGamemode.Server/Inventory/Items/Stungun.cs b/ReallifeGamemode.Server/Inventory/Items/Stungun.cs index ed199a66..f6b1378e 100644 --- a/ReallifeGamemode.Server/Inventory/Items/Stungun.cs +++ b/ReallifeGamemode.Server/Inventory/Items/Stungun.cs @@ -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; diff --git a/ReallifeGamemode.Server/WeaponDeal/WeaponDealManager.cs b/ReallifeGamemode.Server/WeaponDeal/WeaponDealManager.cs index 0dc41119..737b70ad 100644 --- a/ReallifeGamemode.Server/WeaponDeal/WeaponDealManager.cs +++ b/ReallifeGamemode.Server/WeaponDeal/WeaponDealManager.cs @@ -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) {