static cell_t smn_InactivateClient(IPluginContext *pContext, const cell_t *params) { IGamePlayer *player = playerhelpers->GetGamePlayer(params[1]); if (player == NULL) { return pContext->ThrowNativeError("Invalid client index %d", params[1]); } if (!iserver) { return pContext->ThrowNativeError("IServer interface not supported, file a bug report."); } IClient* pClient = iserver->GetClient(params[1] - 1); if (pClient) { pClient->Inactivate(); } else { pContext->ThrowNativeError("Could not get IClient for client %d", params[1]); } return 1; }