Blockland Forums > Modification Help
Callback on client connect
Pages: (1/1)
DontCare4Free:
I'm trying to hook myself up to the ClientConnection::onConnect callback, like this.
--- Code: ---package thePackage {
function ClientConnection::onConnect(%this) {
echo("A client connected");
parent::onConnect(%this);
}
};
activatePackage(thePackage);
--- End code ---
However, nothing happens. Am I hooking up to the wrong class/prototype, or is there anything else bad?
Headcrab Zombie:
1. It's GameConnection, not ClientConnection
2. Use GameConnection::autoAdminCheck
DontCare4Free:
--- Quote from: Headcrab Zombie on August 31, 2011, 06:58:58 PM ---1. It's GameConnection, not ClientConnection
2. Use GameConnection::autoAdminCheck
--- End quote ---
Thanks, worked wonderfully.
Pages: (1/1)