Synced bcompat tree additions and fixes found so far

This commit is contained in:
David Anderson
2006-08-28 11:08:18 +00:00
parent cb01ff1dc3
commit 388711e969
16 changed files with 196 additions and 21 deletions

View File

@ -4076,6 +4076,40 @@ static cell AMX_NATIVE_CALL amxx_setpl_curweap(AMX *amx, cell *params)
return 1;
}
static cell AMX_NATIVE_CALL CreateLangKey(AMX *amx, cell *params)
{
int len;
const char *key = get_amxstring(amx, params[1], 0, len);
int suki = g_langMngr.GetKeyEntry(key);
if (suki != -1)
{
return suki;
}
return g_langMngr.AddKeyEntry(key);
}
static cell AMX_NATIVE_CALL AddTranslation(AMX *amx, cell *params)
{
int len;
const char *lang = get_amxstring(amx, params[1], 0, len);
int suki = params[2];
const char *phrase = get_amxstring(amx, params[3], 1, len);
CQueue<sKeyDef> queue;
sKeyDef def;
def.definition = new String(phrase);
def.key = suki;
queue.push(def);
g_langMngr.MergeDefinitions(lang, queue);
return 1;
}
AMX_NATIVE_INFO amxmodx_Natives[] =
{
{"abort", amx_abort},
@ -4255,8 +4289,10 @@ AMX_NATIVE_INFO amxmodx_Natives[] =
{"user_kill", user_kill},
{"user_slap", user_slap},
{"xvar_exists", xvar_exists},
{"AddTranslation", AddTranslation},
{"ClearSyncHud", ClearSyncHud},
{"CreateHudSyncObj", CreateHudSyncObj},
{"CreateLangKey", CreateLangKey},
{"CreateMultiForward", CreateMultiForward},
{"CreateOneForward", CreateOneForward},
{"DestroyForward", DestroyForward},