PHP Code:
class TEST : public SDKExtension
{
public:
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late);
void Hook_ClientActive(edict_t *pEntity, bool bLoadGame);
};
IServerGameClients *gameclients = NULL;
TEST g_Test;
SMEXT_LINK(&g_Test);
bool TEST::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late)
{
// Error 2 error C2065: 'id' : undeclared identifier
PLUGIN_SAVEVARS();
// Error 3 error C2065: 'maxlen' : undeclared identifier
GET_V_IFACE_ANY(GetServerFactory, gameclients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
// Error 4 error C3861: '__SourceHook_FHAddIServerGameClientsClientActive': identifier not found
SH_ADD_HOOK(IServerGameClients, ClientActive, gameclients, SH_MEMBER(this, &TEST::Hook_ClientActive), true);
return true;
}
void TEST::Hook_ClientActive(edict_t *pEntity, bool bLoadGame)
{
g_pSM->LogError(myself, "Hook_ClientActive(%d, %d)", gamehelpers->IndexOfEdict(pEntity), bLoadGame);
}
Why?