forked from FreeJuicebox/AdminTools
-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Destroying for Rework all Command * Exiled Version * qofieopf * Fuck RegenerationComponent * . * . * . * . * BetterCommand * more ahp possibility * Fix * . * . * . * .GetRandomValue(); * ParentCommand -> ICommand aaa * . * . * IUsageProvider * . * Fix * . * . * No Need to Try Catch Event already does it * . * Unjail all players on restart #52 Co-Authored-By: Thunder <24486646+Thundermaker300@users.noreply.github.com> * . * . * . * . * BetterName * . * fakesync * . * . * . * Fix Lol * Uhmmm not sure if i keep that * Goto the line * AHP Limit is useless * ball speed * . * Fix and response in case no player is found * Lol * . * . * No Need To Catch Error now * . * ?. * . * DoorCommandPatche * Remove unneeded usings * njgjna * that * FIX * revert * a * a * ye * a * a * debug * ok thenm * README.md * Notfixed * Fix Yamato Skill issue Co-Authored-By: Bolton <48883340+boltondev@users.noreply.github.com> * going to make it later * changes * no more capital letter start * English Co-authored-by: Alex Rouse <123724383+ALEXWARELLC@users.noreply.github.com> * use basegame permissions * HintBroadcast changes (#82) Co-authored-by: Nameless <85962933+Misfiy@users.noreply.github.com> * Remove unused code * permissions * Changes * Fix SpawnWorkbench command (#86) * Gives SpawnRagdoll the ability to have custom names & Death reasons (#84) l * Changes GodTuts (#85) * Remove hiddentags * Change --------- Co-authored-by: Yamato <louismonneyron5@yahoo.com> Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: Thunder <24486646+Thundermaker300@users.noreply.github.com> Co-authored-by: Bolton <48883340+boltondev@users.noreply.github.com> Co-authored-by: Alex Rouse <123724383+ALEXWARELLC@users.noreply.github.com> Co-authored-by: 6hundred9 <96420090+6hundred9@users.noreply.github.com> Co-authored-by: Benjamin <benjaminro21@gmail.com>
- Loading branch information
1 parent
f48db84
commit af2381d
Showing
87 changed files
with
2,377 additions
and
3,981 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[*.cs] | ||
|
||
# Default severity for all analyzer diagnostics | ||
dotnet_analyzer_diagnostic.severity = none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using CommandSystem; | ||
using Exiled.API.Features; | ||
using RemoteAdmin; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace AdminTools.Commands | ||
{ | ||
[CommandHandler(typeof(RemoteAdminCommandHandler))] | ||
[CommandHandler(typeof(GameConsoleCommandHandler))] | ||
public class Ahp : ICommand, IUsageProvider | ||
{ | ||
public string Command { get; } = "ahp"; | ||
|
||
public string[] Aliases { get; } = Array.Empty<string>(); | ||
|
||
public string Description { get; } = "Sets a user or users Artificial HP to a specified value"; | ||
|
||
public string[] Usage { get; } = new string[] { "%player%", "Value", "[decay = 1.2]", "[efficacy = 0.7]", "[sustain = 0]", "[IsPersistant = false]" }; | ||
|
||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response) | ||
{ | ||
if (!sender.CheckPermission(PlayerPermissions.PlayersManagement, out response)) | ||
return false; | ||
|
||
if (arguments.Count < 2) | ||
{ | ||
response = "Usage: ahp ((player id / name) or (all / *)) (value) [decay = 1.2] [efficacy = 0.7] [sustain = 0] [persistant = false]"; | ||
return false; | ||
} | ||
|
||
IEnumerable<Player> players = Player.GetProcessedData(arguments); | ||
if (players.IsEmpty()) | ||
{ | ||
response = $"Player not found: {arguments.At(0)}"; | ||
return false; | ||
} | ||
|
||
if (!float.TryParse(arguments.At(1), out float value)) | ||
{ | ||
response = $"Invalid value for AHP: {value}"; | ||
return false; | ||
} | ||
|
||
if (!float.TryParse(arguments.ElementAtOrDefault(3), out float decay)) | ||
decay = 1.2f; | ||
|
||
if (!float.TryParse(arguments.ElementAtOrDefault(4), out float efficacy)) | ||
efficacy = 0.7f; | ||
|
||
float.TryParse(arguments.ElementAtOrDefault(5), out float sustain); | ||
|
||
bool.TryParse(arguments.ElementAtOrDefault(6), out bool persistant); | ||
|
||
foreach (Player p in players) | ||
{ | ||
p.AddAhp(value, value, decay, efficacy, sustain, persistant); | ||
} | ||
response = $"AHP has been set to {value} for all the followed players:\n{Extensions.LogPlayers(players)}"; | ||
return true; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using CommandSystem; | ||
using Exiled.API.Features; | ||
using Exiled.Permissions.Extensions; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Exiled.API.Enums; | ||
using Exiled.API.Features.Pickups.Projectiles; | ||
using PlayerRoles.FirstPersonControl; | ||
using Random = UnityEngine.Random; | ||
|
||
namespace AdminTools.Commands | ||
{ | ||
[CommandHandler(typeof(RemoteAdminCommandHandler))] | ||
[CommandHandler(typeof(GameConsoleCommandHandler))] | ||
public class Ball : ICommand, IUsageProvider | ||
{ | ||
public string Command { get; } = "ball"; | ||
|
||
public string[] Aliases { get; } = Array.Empty<string>(); | ||
|
||
public string Description { get; } = "Spawns a bouncy ball (SCP-018) on a user or all users"; | ||
|
||
public string[] Usage { get; } = new string[] { "%player%", "[Speed = 5]","[IsMute = false]"}; | ||
|
||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response) | ||
{ | ||
if (!sender.CheckPermission(PlayerPermissions.GivingItems, out response)) | ||
return false; | ||
|
||
if (arguments.Count < 1) | ||
{ | ||
response = "Usage: ball ((player id/ name) or (all / *)) [Speed] [IsMute]"; | ||
return false; | ||
} | ||
|
||
IEnumerable<Player> players = Player.GetProcessedData(arguments); | ||
if (players.IsEmpty()) | ||
{ | ||
response = $"Player not found: {arguments.At(0)}"; | ||
return false; | ||
} | ||
|
||
if (!float.TryParse(arguments.ElementAtOrDefault(1), out float speed) || speed >= 200) | ||
speed = 5; | ||
|
||
if (!bool.TryParse(arguments.ElementAtOrDefault(2), out bool isMute) || !isMute) | ||
Cassie.Message("pitch_1.5 xmas_bouncyballs"); | ||
|
||
foreach (Player p in players) | ||
{ | ||
Scp018Projectile scp018 = Projectile.CreateAndSpawn(ProjectileType.Scp018, p.Position, p.Transform.rotation).As<Scp018Projectile>(); | ||
scp018.Rigidbody.velocity = p.ReferenceHub.GetVelocity() + Random.onUnitSphere * speed; | ||
} | ||
|
||
response = $"Ball has been spawn for all the followed player:\n{Extensions.LogPlayers(players)}"; | ||
return true; | ||
} | ||
} | ||
} |
Oops, something went wrong.