Merge.
This commit is contained in:
commit
46b9ae4174
@ -1097,7 +1097,9 @@ void PlayerManager::OnClientSettingsChanged(edict_t *pEntity)
|
|||||||
{
|
{
|
||||||
if (!CheckSetAdminName(client, pPlayer, id))
|
if (!CheckSetAdminName(client, pPlayer, id))
|
||||||
{
|
{
|
||||||
pPlayer->Kick("Your name is reserved by SourceMod; set your password to use it.");
|
char kickMsg[128];
|
||||||
|
logicore.CoreTranslate(kickMsg, sizeof(kickMsg), "%T", 2, NULL, "Name Reserved", &client);
|
||||||
|
pPlayer->Kick(kickMsg);
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
} else if ((id = g_Admins.FindAdminByIdentity("name", old_name)) != INVALID_ADMIN_ID) {
|
} else if ((id = g_Admins.FindAdminByIdentity("name", old_name)) != INVALID_ADMIN_ID) {
|
||||||
|
@ -54,34 +54,41 @@ DisplayGagTypesMenu(client)
|
|||||||
|
|
||||||
if (!g_Muted[target])
|
if (!g_Muted[target])
|
||||||
{
|
{
|
||||||
AddMenuItem(menu, "0", "Mute Player");
|
AddTranslatedMenuItem(menu, "0", "Mute Player", client);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddMenuItem(menu, "1", "UnMute Player");
|
AddTranslatedMenuItem(menu, "1", "UnMute Player", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_Gagged[target])
|
if (!g_Gagged[target])
|
||||||
{
|
{
|
||||||
AddMenuItem(menu, "2", "Gag Player");
|
AddTranslatedMenuItem(menu, "2", "Gag Player", client);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddMenuItem(menu, "3", "UnGag Player");
|
AddTranslatedMenuItem(menu, "3", "UnGag Player", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_Muted[target] || !g_Gagged[target])
|
if (!g_Muted[target] || !g_Gagged[target])
|
||||||
{
|
{
|
||||||
AddMenuItem(menu, "4", "Silence Player");
|
AddTranslatedMenuItem(menu, "4", "Silence Player", client);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddMenuItem(menu, "5", "UnSilence Player");
|
AddTranslatedMenuItem(menu, "5", "UnSilence Player", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddTranslatedMenuItem(Handle:menu, const String:opt[], const String:phrase[], client)
|
||||||
|
{
|
||||||
|
decl String:buffer[128];
|
||||||
|
Format(buffer, sizeof(buffer), "%T", phrase, client);
|
||||||
|
AddMenuItem(menu, opt, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
DisplayGagPlayerMenu(client)
|
DisplayGagPlayerMenu(client)
|
||||||
{
|
{
|
||||||
new Handle:menu = CreateMenu(MenuHandler_GagPlayer);
|
new Handle:menu = CreateMenu(MenuHandler_GagPlayer);
|
||||||
|
@ -81,8 +81,8 @@ public OnPluginStart()
|
|||||||
OnAdminMenuReady(topmenu);
|
OnAdminMenuReady(topmenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_MapList = CreateMenu(MenuHandler_ChangeMap);
|
g_MapList = CreateMenu(MenuHandler_ChangeMap, MenuAction_Display);
|
||||||
SetMenuTitle(g_MapList, "Please select a map");
|
SetMenuTitle(g_MapList, "%T", "Please select a map", LANG_SERVER);
|
||||||
SetMenuExitBackButton(g_MapList, true);
|
SetMenuExitBackButton(g_MapList, true);
|
||||||
|
|
||||||
decl String:mapListPath[PLATFORM_MAX_PATH];
|
decl String:mapListPath[PLATFORM_MAX_PATH];
|
||||||
|
@ -82,6 +82,12 @@ public MenuHandler_ExecCFG(Handle:menu, MenuAction:action, param1, param2)
|
|||||||
|
|
||||||
PerformExec(param1, path);
|
PerformExec(param1, path);
|
||||||
}
|
}
|
||||||
|
else if (action == MenuAction_Display)
|
||||||
|
{
|
||||||
|
decl String:title[128];
|
||||||
|
Format(title, sizeof(title), "%T", "Choose Config", param1);
|
||||||
|
SetPanelTitle(Handle:param2, title);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action:Command_ExecCfg(client, args)
|
public Action:Command_ExecCfg(client, args)
|
||||||
@ -115,8 +121,8 @@ ParseConfigs()
|
|||||||
CloseHandle(g_ConfigMenu);
|
CloseHandle(g_ConfigMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_ConfigMenu = CreateMenu(MenuHandler_ExecCFG);
|
g_ConfigMenu = CreateMenu(MenuHandler_ExecCFG, MenuAction_Display);
|
||||||
SetMenuTitle(g_ConfigMenu, "Choose Config");
|
SetMenuTitle(g_ConfigMenu, "%T", "Choose Config", LANG_SERVER);
|
||||||
SetMenuExitBackButton(g_ConfigMenu, true);
|
SetMenuExitBackButton(g_ConfigMenu, true);
|
||||||
|
|
||||||
decl String:configPath[256];
|
decl String:configPath[256];
|
||||||
|
@ -53,7 +53,12 @@ public MenuHandler_ChangeMap(Handle:menu, MenuAction:action, param1, param2)
|
|||||||
new Handle:dp;
|
new Handle:dp;
|
||||||
CreateDataTimer(3.0, Timer_ChangeMap, dp);
|
CreateDataTimer(3.0, Timer_ChangeMap, dp);
|
||||||
WritePackString(dp, map);
|
WritePackString(dp, map);
|
||||||
|
}
|
||||||
|
else if (action == MenuAction_Display)
|
||||||
|
{
|
||||||
|
decl String:title[128];
|
||||||
|
Format(title, sizeof(title), "%T", "Please select a map", param1);
|
||||||
|
SetPanelTitle(Handle:param2, title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,8 +118,8 @@ public OnPluginStart()
|
|||||||
|
|
||||||
g_SelectedMaps = CreateArray(33);
|
g_SelectedMaps = CreateArray(33);
|
||||||
|
|
||||||
g_MapList = CreateMenu(MenuHandler_Map, MenuAction_DrawItem);
|
g_MapList = CreateMenu(MenuHandler_Map, MenuAction_DrawItem|MenuAction_Display);
|
||||||
SetMenuTitle(g_MapList, "Please select a map");
|
SetMenuTitle(g_MapList, "%T", "Please select a map", LANG_SERVER);
|
||||||
SetMenuExitBackButton(g_MapList, true);
|
SetMenuExitBackButton(g_MapList, true);
|
||||||
|
|
||||||
decl String:mapListPath[PLATFORM_MAX_PATH];
|
decl String:mapListPath[PLATFORM_MAX_PATH];
|
||||||
|
@ -84,7 +84,9 @@ ConfirmVote(client)
|
|||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
AddMenuItem(menu, "Confirm", "Start the Vote");
|
decl String:itemtext[256];
|
||||||
|
Format(itemtext, sizeof(itemtext), "%T", "Start the Vote", client);
|
||||||
|
AddMenuItem(menu, "Confirm", itemtext);
|
||||||
|
|
||||||
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
||||||
}
|
}
|
||||||
@ -168,6 +170,12 @@ public MenuHandler_Map(Handle:menu, MenuAction:action, param1, param2)
|
|||||||
ConfirmVote(param1);
|
ConfirmVote(param1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (action == MenuAction_Display)
|
||||||
|
{
|
||||||
|
decl String:title[128];
|
||||||
|
Format(title, sizeof(title), "%T", "Please select a map", param1);
|
||||||
|
SetPanelTitle(Handle:param2, title);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -335,3 +335,10 @@ public OnAdminMenuReady(Handle:topmenu)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddTranslatedMenuItem(Handle:menu, const String:opt[], const String:phrase[], client)
|
||||||
|
{
|
||||||
|
decl String:buffer[128];
|
||||||
|
Format(buffer, sizeof(buffer), "%T", phrase, client);
|
||||||
|
AddMenuItem(menu, opt, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -122,9 +122,9 @@ DisplayAmountMenu(client)
|
|||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
AddMenuItem(menu, "255", "Fully blind");
|
AddTranslatedMenuItem(menu, "255", "Fully blind", client);
|
||||||
AddMenuItem(menu, "240", "Half blind");
|
AddTranslatedMenuItem(menu, "240", "Half blind", client);
|
||||||
AddMenuItem(menu, "0", "No blind");
|
AddTranslatedMenuItem(menu, "0", "No blind", client);
|
||||||
|
|
||||||
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
||||||
}
|
}
|
||||||
|
@ -83,11 +83,11 @@ DisplayGravityAmountMenu(client)
|
|||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
AddMenuItem(menu, "4.0", "Gravity Very High");
|
AddTranslatedMenuItem(menu, "4.0", "Gravity Very High", client);
|
||||||
AddMenuItem(menu, "2.0", "Gravity High");
|
AddTranslatedMenuItem(menu, "2.0", "Gravity High", client);
|
||||||
AddMenuItem(menu, "1.0", "Gravity Normal");
|
AddTranslatedMenuItem(menu, "1.0", "Gravity Normal", client);
|
||||||
AddMenuItem(menu, "0.5", "Gravity Low");
|
AddTranslatedMenuItem(menu, "0.5", "Gravity Low", client);
|
||||||
AddMenuItem(menu, "0.1", "Gravity Very Low");
|
AddTranslatedMenuItem(menu, "0.1", "Gravity Very Low", client);
|
||||||
|
|
||||||
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
||||||
}
|
}
|
||||||
|
@ -45,4 +45,34 @@
|
|||||||
"#format" "{1:t}"
|
"#format" "{1:t}"
|
||||||
"en" "Unsilenced {1}."
|
"en" "Unsilenced {1}."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"Mute Player"
|
||||||
|
{
|
||||||
|
"en" "Mute Player"
|
||||||
|
}
|
||||||
|
|
||||||
|
"UnMute Player"
|
||||||
|
{
|
||||||
|
"en" "UnMute Player"
|
||||||
|
}
|
||||||
|
|
||||||
|
"Gag Player"
|
||||||
|
{
|
||||||
|
"en" "Gag Player"
|
||||||
|
}
|
||||||
|
|
||||||
|
"UnGag Player"
|
||||||
|
{
|
||||||
|
"en" "UnGag Player"
|
||||||
|
}
|
||||||
|
|
||||||
|
"Silence Player"
|
||||||
|
{
|
||||||
|
"en" "Silence Player"
|
||||||
|
}
|
||||||
|
|
||||||
|
"UnSilence Player"
|
||||||
|
{
|
||||||
|
"en" "UnSilence Player"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,4 +88,14 @@
|
|||||||
{
|
{
|
||||||
"en" "Confirm Vote"
|
"en" "Confirm Vote"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"Please select a map"
|
||||||
|
{
|
||||||
|
"en" "Please select a map"
|
||||||
|
}
|
||||||
|
|
||||||
|
"Start the Vote"
|
||||||
|
{
|
||||||
|
"en" "Start the Vote"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,11 @@
|
|||||||
"en" "No Vote"
|
"en" "No Vote"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"Name Reserved"
|
||||||
|
{
|
||||||
|
"en" "Your name is reserved by SourceMod; set your password to use it."
|
||||||
|
}
|
||||||
|
|
||||||
/* This is a special "pass-thru" translation */
|
/* This is a special "pass-thru" translation */
|
||||||
"_s"
|
"_s"
|
||||||
{
|
{
|
||||||
|
@ -141,4 +141,14 @@
|
|||||||
"#format" "{1:s}"
|
"#format" "{1:s}"
|
||||||
"en" "Cvar {1} is now protected."
|
"en" "Cvar {1} is now protected."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"Please select a map"
|
||||||
|
{
|
||||||
|
"en" "Please select a map"
|
||||||
|
}
|
||||||
|
|
||||||
|
"Choose Config"
|
||||||
|
{
|
||||||
|
"en" "Choose Config"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user