Welcomer
TEXT Code:
using System;
using Addon;
namespace plugin_test
{
public class plugin_test : CPlugin
{
public override void OnServerLoad()
{
ServerPrint("Welcomer plugin by Tylerd86 loaded!");
}
public override void OnPlayerConnect(ServerClient Client)
{
ServerSay("^7Welcomer: ^2Everyone welcome ^3" + Client.Name + " ^2to the server!", true);
}
}
}
Fov
TEXT Code:
using System;
using Addon;
namespace fov
{
public class fov : CPlugin
{
public override void OnServerLoad()
{
ServerPrint("Fov plugin loaded! by Tylerd86 & JariZ");
}
public override void OnPlayerConnect(ServerClient Client)
{
SetClientDvar(Client.ClientNum, string.Format("cg_fov \"{0}\"", GetServerCFG("FOV", "fov", "80")));
SetClientDvar(Client.ClientNum, string.Format("cg_fovscale \"{0}\"", GetServerCFG("FOV", "fovscale", "1.125")));
}
}
}
PlayerLog
TEXT Code:
using System;
using Addon;
using System.IO;
namespace PlayerLog
{
public class PlayerLog : CPlugin
{
string logpath = "addon\\logs\\player.log";
public override void OnServerLoad()
{
ServerPrint("PlayerLog loaded! by Tylerd86 & JariZ :D");
}
void writeCollumns()
{
StreamWriter rw = new StreamWriter(logpath, false);
rw.WriteLine("NUM NAME XUID RATE PING");
rw.Close();
}
public override void OnPlayerConnect(ServerClient Client)
{
try
{
if (File.Exists(logpath))
{
writeCollumns();
if (File.ReadAllText(logpath) == string.Empty)
writeCollumns();
}
StreamWriter sr = new StreamWriter(logpath, true);
sr.WriteLine(Client.ClientNum + " " + Client.Name + " " + Client.XUID + " " + Client.Rate + " " + Client.Ping);
sr.Close();
}
catch (Exception z) { ServerPrint("[PLAYERLOG] " + z.ToString()); }
}
}
}