Skip to content
Permalink
Browse files

Plugin Update

- Some chat messages changed to not appear in global chat

- Other fixes
  • Loading branch information...
M0RG4N01 committed Jul 18, 2019
1 parent ad20248 commit 27970fe7648694a947d379b365d644cfa57d871a
@@ -1,13 +1,7 @@
using Rocket.API;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Player;
using SDG.Provider;
using SDG.Unturned;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace IsAbusing
{
@@ -53,19 +47,19 @@ public void Execute(IRocketPlayer caller, string[] command)
player2 = UnturnedPlayer.FromName(command[0]);
if (player2 != null)
{
if (player2.GodMode == true)
if (player2.GodMode)
{
UnturnedChat.Say(player2.CharacterName + " Has godmode enabled");
UnturnedChat.Say(caller, player2.CharacterName + " Has godmode enabled");
}
else
{
UnturnedChat.Say(player2.CharacterName + " Has godmode disabled");
UnturnedChat.Say(caller, player2.CharacterName + " Has godmode disabled");
}
}
else
{
UnturnedChat.Say("You may not have entered a player's name correctly or they are not in the server!");
UnturnedChat.Say("Correct usage: /isgod PLAYERNAME");
UnturnedChat.Say(caller, "You may not have entered a player's name correctly or they are not in the server!");
UnturnedChat.Say(caller, "Correct usage: /isgod PLAYERNAME");
}
}
}
@@ -1,13 +1,7 @@
using Rocket.API;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Player;
using SDG.Provider;
using SDG.Unturned;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace IsAbusing
{
@@ -17,7 +11,7 @@ class CommandIsVanish : IRocketCommand

public string Help
{
get { return "See's if the user is in vanish."; }
get { return "See if the user is in vanish."; }
}

public string Name
@@ -54,18 +48,19 @@ public void Execute(IRocketPlayer caller, string[] command)
player2 = UnturnedPlayer.FromName(command[0]);
if (player2 != null)
{
if (player2.VanishMode == true)
if (player2.VanishMode)
{
UnturnedChat.Say(player2.CharacterName + " Has vanish enabled");
UnturnedChat.Say(caller, player2.CharacterName + " has vanish enabled");
}
else
{
UnturnedChat.Say(player2.CharacterName + " Has vanish disabled");
UnturnedChat.Say(caller, player2.CharacterName + " has vanish disabled");
}
}
else
{
UnturnedChat.Say("You may not have entered a player's name correctly or they are not in the server! \nCorrect usage: /isvanish PLAYERNAME");
UnturnedChat.Say(caller, "You may not have entered a player's name correctly or they are not in the server!");
UnturnedChat.Say(caller, "Correct usage: /isvanish PLAYERNAME");
}

}
@@ -1,18 +1,12 @@
using Rocket.Core.Plugins;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rocket.API.Collections;
using Rocket.Unturned;
using Rocket.Unturned.Player;
using UnityEngine;
using SDG.Unturned;
using Steamworks;
using Rocket.Unturned.Chat;
using Rocket.Core.Logging;
using System.IO;
using Rocket.Unturned.Commands;

namespace IsAbusing
{
@@ -22,12 +16,10 @@ public class IsAbusing : RocketPlugin<IsAbusingConfiguration>

public string directory = System.IO.Directory.GetCurrentDirectory() + "/..";

public static UnturnedPlayer murderer3;

protected override void Load()
{
Instance = this;
Rocket.Unturned.Events.UnturnedPlayerEvents.OnPlayerDeath += onplayerdeath;
Rocket.Unturned.Events.UnturnedPlayerEvents.OnPlayerDeath += onPlayerDeath;
Rocket.Core.Logging.Logger.Log("IsAbusing has loaded!");

if (File.Exists(directory + "/Admin-Abuse.txt"))
@@ -42,14 +34,11 @@ protected override void Load()

protected override void Unload()
{
Rocket.Unturned.Events.UnturnedPlayerEvents.OnPlayerDeath -= onplayerdeath;
Rocket.Unturned.Events.UnturnedPlayerEvents.OnPlayerDeath -= onPlayerDeath;
Rocket.Core.Logging.Logger.Log("IsAbusing has unloaded!");
}

private void FixedUpdate()
{

}
private void FixedUpdate() { }

public override TranslationList DefaultTranslations
{
@@ -59,12 +48,12 @@ public override TranslationList DefaultTranslations
};
}
}
private void onplayerdeath(UnturnedPlayer player, EDeathCause cause, ELimb limb, CSteamID murderer)
private void onPlayerDeath(UnturnedPlayer player, EDeathCause cause, ELimb limb, CSteamID murderer)
{
murderer3 = UnturnedPlayer.FromCSteamID(murderer);
UnturnedPlayer murderer3 = UnturnedPlayer.FromCSteamID(murderer);
if (Configuration.Instance.ShowInChat == true)
{
if (cause == EDeathCause.SENTRY) { }
if (cause == EDeathCause.SENTRY) return;
try
{
if (murderer3.GodMode == true)
@@ -39,6 +39,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>lib\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="LYHMENexus">
<HintPath>C:\Users\MorganMc\AppData\Roaming\.minecraft\versions\LYHMENexus.exe</HintPath>
</Reference>
<Reference Include="Rocket.API, Version=2.6.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>lib\Rocket.API.dll</HintPath>
@@ -0,0 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue">&lt;AssemblyExplorer&gt;&#xD;
&lt;Assembly Path="C:\Users\MorganMc\AppData\Roaming\.minecraft\versions\LYHMENexus.exe" /&gt;&#xD;
&lt;/AssemblyExplorer&gt;</s:String></wpf:ResourceDictionary>
Binary file not shown.
@@ -1 +1 @@
704dd581d670d3d7020fa0dd4c1db7dd4d2aecf8
1cd543db18c72555cac4aa974d64647ac8d32cd6
Binary file not shown.

0 comments on commit 27970fe

Please sign in to comment.
You can’t perform that action at this time.