SM Central fixes for new language natives (bug 4613).

This commit is contained in:
Nicholas Hastings
2011-03-12 23:56:04 -05:00
parent a81567e2d6
commit 46804d0faf
4 changed files with 11 additions and 3 deletions
+2 -2
View File
@@ -106,14 +106,14 @@ static cell_t sm_GetLanguageInfo(IPluginContext *pContext, const cell_t *params)
static cell_t sm_SetClientLanguage(IPluginContext *pContext, const cell_t *params)
{
CPlayer *player = g_Players.GetPlayerByIndex(params[1]);
IGamePlayer *player = playerhelpers->GetGamePlayer(params[1]);
if (!player || !player->IsInGame())
{
return pContext->ThrowNativeError("Invalid client index %d", params[1]);
}
player->m_LangId = params[2];
player->SetLanguageId(params[2]);
return 1;
}