Skip to content

Commit

Permalink
Fix admin blue hammer
Browse files Browse the repository at this point in the history
  • Loading branch information
RestoreMonarchy committed Sep 23, 2024
1 parent a2a5a81 commit 5e2cd38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Duty/Duty.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net48</TargetFramework>
<LangVersion>latest</LangVersion>
<RootNamespace>RestoreMonarchy.Duty</RootNamespace>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 5 additions & 3 deletions Duty/Helpers/DutyHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using RestoreMonarchy.Duty.Models;
using RestoreMonarchy.Duty.Services;
Expand All @@ -8,6 +9,7 @@
using Rocket.Unturned.Chat;
using Rocket.Unturned.Player;
using SDG.Unturned;
using Steamworks;
using UnityEngine;
using Logger = Rocket.Core.Logging.Logger;

Expand Down Expand Up @@ -59,9 +61,9 @@ public static void OnDuty(UnturnedPlayer player, DutyGroup dutyGroup)
}
if (dutySettings.AdminBlueHammer)
{
player.Player.channel.owner.isAdmin = true;
SteamAdminlist.admin(player.CSteamID, Provider.server);
SteamAdminlist.list.RemoveAll(x => x.playerID == player.CSteamID);
}

if (dutySettings.AdminBuilding)
{
player.Player.look.sendWorkzoneAllowed(true);
Expand Down Expand Up @@ -152,7 +154,7 @@ public static void OffDuty(UnturnedPlayer player, DutyGroup dutyGroup)

if (dutyGroup.Settings.AdminBlueHammer)
{
player.Player.channel.owner.isAdmin = false;
SteamAdminlist.unadmin(player.CSteamID);
}

if (dutyGroup.Settings.GodMode)
Expand Down

0 comments on commit 5e2cd38

Please sign in to comment.