Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Diagonall committed Jan 3, 2019
1 parent 4921079 commit c84c399
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions RPLicenses.cs
Expand Up @@ -124,7 +124,7 @@ private void OnInventoryUpdated(UnturnedPlayer player, InventoryGroup inventoryG
return;
}

if (player.IsAdmin)
if (player.IsAdmin && Instance.Configuration.Instance.IgnoreAdmin)
{
return;
}
Expand Down Expand Up @@ -176,7 +176,7 @@ private void OnPlayerUpdateStance(UnturnedPlayer player, byte stance)
if (stance == 6 && Configuration.Instance.VehicleLicense)
{

if (player.IsAdmin)
if (player.IsAdmin && Instance.Configuration.Instance.IgnoreAdmin)
{
return;
}
Expand All @@ -186,6 +186,11 @@ private void OnPlayerUpdateStance(UnturnedPlayer player, byte stance)
return;
}

if (player.CurrentVehicle.asset.id == 185)
{
return;
}

for (byte page = 0; page < 8; page++)
{
var count = player.Inventory.getItemCount(page);
Expand Down
2 changes: 2 additions & 0 deletions RPLicensesConfiguration.cs
Expand Up @@ -9,6 +9,7 @@ public class RPLicensesConfiguration : IRocketPluginConfiguration
[XmlArrayItem(ElementName = "WeaponID")]
public List<LicensedWeapon> Licensed;

public bool IgnoreAdmin;
public bool LicensesMessage;
public bool DisableLicensesOnGroupOnline;
public string DisableLicensesPermission;
Expand All @@ -30,6 +31,7 @@ public void LoadDefaults()
new LicensedWeapon { Id = 297 }
};

IgnoreAdmin = true;
LicensesMessage = true;
DisableLicensesOnGroupOnline = true;
DisableLicensesPermission = "license.disable";
Expand Down

0 comments on commit c84c399

Please sign in to comment.