PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX *amx) {
  int error = CrashDetect::Create(amx)->Load();
  if (error == AMX_ERR_NONE) {
    amx_SetCallback(amx, AmxCallback);
    amx_SetExecErrorHandler(amx, AmxExecError);
    return amx_Register(amx, natives::list, -1);
  }
  return error;
}
Exemplo n.º 2
0
PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX *amx) {
  CrashDetect::CreateInstance(amx)->Load();

  amx_SetDebugHook(amx, AmxDebug);
  amx_SetCallback(amx, AmxCallback);
  amx_SetExecErrorHandler(amx, AmxExecError);

  RegisterNatives(amx);
  return AMX_ERR_NONE;
}