Just little simple example:
PHP Code:
#include "tf2.h"
#define _MSG Msg
class WoW
{
void printf(string txt)
{
#ifdef _MSG
_MSG(txt + "\n");
#endif
}
}
void OnClientFullyConnect(int index) {
#ifdef CLIENT
BasePlayer@ pl = cast<BasePlayer@>(CTFPlayer(index));
#endif // I am working on #else...
#ifdef SERVER //
BasePlayer@ pl = cast<BasePlayer@>(TFPlayer(index));
#endif
pl->Kick("Im sorry...");
}
bool PluginLoad() {
WoW().printf("Oof!");
return true;
}
bool PluginUnload() {
WoW().printf("Oof?");
return true;
}