05-05-2012, 09:30
Hi I created two example libraries.
A parent, after which the child class inherits.
Why such a solution does not work where I do wrong?
Parent:
Child:
A parent, after which the child class inherits.
Why such a solution does not work where I do wrong?
Parent:
PHP Code:
using System;
using Addon;
namespace Parent
{
public class parent : CPlugin
{
public parent(string Name)
{
ServerPrint("Plugin " + Name + " loaded");
}
public override void OnPlayerSpawned(Addon.ServerClient Client)
{
ServerPrint("#1 Player: " + Client.Name + " spawned");
}
}
}
Child:
PHP Code:
using System;
using Parent;
namespace Child
{
public class child : parent
{
child() : base("Test Child Plugin")
{
}
public override void OnPlayerSpawned(Addon.ServerClient Client)
{
ServerPrint("#2 Player: " + Client.Name + " spawned");
}
}
}