Skip to content
Permalink
Browse files

Fixes

Fixes
  • Loading branch information...
Alexr03 committed Aug 25, 2016
1 parent 23ea7c5 commit deb1518439f7d625e9defc5886067d023b3df968
@@ -11,6 +11,7 @@
using SDG.Unturned;
using Steamworks;
using Rocket.Unturned.Chat;
using Rocket.Core.Logging;

namespace IsAbusing
{
@@ -48,14 +49,29 @@ public override TranslationList DefaultTranslations
private void onplayerdeath(UnturnedPlayer player, EDeathCause cause, ELimb limb, CSteamID murderer)
{
murderer3 = UnturnedPlayer.FromCSteamID(murderer);

if (murderer3.GodMode == true)
if (Configuration.Instance.ShowInChat == true)
{
UnturnedChat.Say(player.CharacterName + "Died by a player in godmode ABUSER: " + murderer3.CharacterName);
}
try {
if (murderer3.GodMode == true)
{
UnturnedChat.Say(player.CharacterName + " Died by a player in godmode ABUSER: " + murderer3.CharacterName, UnturnedChat.GetColorFromName(Configuration.Instance.Color, Color.green));
}
else
{
Logger.Log(player.CharacterName + " Died by a player not in godmode");
}
}
catch (Exception e)
{
if (Configuration.Instance.debug == true)
{
Logger.LogException(e);
}
}
}
else
{
UnturnedChat.Say(player.CharacterName + " Died by a player not in godmode");
Logger.Log("Chat is disabled to show messages.");
}
}
}
@@ -10,10 +10,14 @@ namespace IsAbusing
public class IsAbusingConfiguration : IRocketPluginConfiguration
{
public bool debug;
public bool ShowInChat;
public string Color;

public void LoadDefaults()
{
debug = true;
debug = false;
ShowInChat = true;
Color = "yellow";
}
}
}
Binary file not shown.
BIN +512 Bytes (110%) bin/Debug/IsAbusing.dll
Binary file not shown.
BIN +0 Bytes (100%) bin/Debug/IsAbusing.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN +512 Bytes (110%) obj/Debug/IsAbusing.dll
Binary file not shown.
BIN +0 Bytes (100%) obj/Debug/IsAbusing.pdb
Binary file not shown.

0 comments on commit deb1518

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