static cell_t FadeClientVolume(IPluginContext *pContext, const cell_t *params) { int client = params[1]; if (client < 1 || client > playerhelpers->GetMaxClients()) { return pContext->ThrowNativeError("Client index %d is not valid", client); } IGamePlayer *player = playerhelpers->GetGamePlayer(client); if (!player->IsInGame()) { return pContext->ThrowNativeError("Client index %d is not in game", client); } engine->FadeClientVolume( #if SOURCE_ENGINE == SE_DOTA player->GetIndex(), #else player->GetEdict(), #endif sp_ctof(params[2]), sp_ctof(params[3]), sp_ctof(params[4]), sp_ctof(params[5])); return 1; }