Skip to content
Permalink
Browse files

Added logging

Added Logging
  • Loading branch information...
Alexr03 committed Aug 31, 2016
1 parent deb1518 commit 21eecc0b62b9f999394bb9a0afcb0fef2db8d46c
@@ -12,19 +12,33 @@
using Steamworks;
using Rocket.Unturned.Chat;
using Rocket.Core.Logging;
using System.IO;

namespace IsAbusing
{
public class IsAbusing : RocketPlugin<IsAbusingConfiguration>
{
public static IsAbusing Instance;

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

public static UnturnedPlayer murderer3;

protected override void Load()
{
Instance = this;
Rocket.Unturned.Events.UnturnedPlayerEvents.OnPlayerDeath += onplayerdeath;

Logger.Log("FUCKING LOCATION >> " + directory);

if (File.Exists(directory + "/Admin-Abuse.txt)"))
{

}
else
{
File.CreateText(directory + "/Admin-Abuse.txt");
}
}

protected override void Unload()
@@ -55,7 +69,14 @@ private void onplayerdeath(UnturnedPlayer player, EDeathCause cause, ELimb limb,
if (murderer3.GodMode == true)
{
UnturnedChat.Say(player.CharacterName + " Died by a player in godmode ABUSER: " + murderer3.CharacterName, UnturnedChat.GetColorFromName(Configuration.Instance.Color, Color.green));

using (StreamWriter w = File.AppendText(directory + "/Admin-Abuse.txt"))
{
w.WriteLine(player.CharacterName + " Died by a abusive admin! ABUSER: " + murderer3.CharacterName + " Steam64ID: " + murderer3.CSteamID + "\n)");
w.Close();
}

}
else
{
Logger.Log(player.CharacterName + " Died by a player not in godmode");
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.
BIN +410 Bytes (110%) bin/Debug/IsAbusing.zip
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 21eecc0

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