overhaul of the phrases for consistency
renamed config files for adminmenu cleaned up execcfg menu code --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401598
This commit is contained in:
parent
2b15d877aa
commit
5d72810449
@ -2,5 +2,4 @@
|
|||||||
//
|
//
|
||||||
// List maps here to be added to the map and votemap sections of the admin menu
|
// List maps here to be added to the map and votemap sections of the admin menu
|
||||||
//
|
//
|
||||||
// Leave this file empty, or delete it, to use the contents of your /maps/ folder
|
|
||||||
|
|
@ -36,7 +36,7 @@ DisplayBanTargetMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_BanPlayerList);
|
new Handle:menu = CreateMenu(MenuHandler_BanPlayerList);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Ban Player", client);
|
Format(title, sizeof(title), "%T:", "Ban player", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ DisplayBanTimeMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_BanTimeList);
|
new Handle:menu = CreateMenu(MenuHandler_BanTimeList);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Ban Player", client);
|
Format(title, sizeof(title), "%T:", "Ban player", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -70,10 +70,12 @@ DisplayBanReasonMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_BanReasonList);
|
new Handle:menu = CreateMenu(MenuHandler_BanReasonList);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Ban Reason", client);
|
Format(title, sizeof(title), "%T:", "Ban reason", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
|
/* :TODO: we should either remove this or make it configurable */
|
||||||
|
|
||||||
AddMenuItem(menu, "Abusive", "Abusive");
|
AddMenuItem(menu, "Abusive", "Abusive");
|
||||||
AddMenuItem(menu, "Racism", "Racism");
|
AddMenuItem(menu, "Racism", "Racism");
|
||||||
AddMenuItem(menu, "General cheating/exploits", "General cheating/exploits");
|
AddMenuItem(menu, "General cheating/exploits", "General cheating/exploits");
|
||||||
@ -100,7 +102,7 @@ public AdminMenu_Ban(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Ban Player", param);
|
Format(buffer, maxlength, "%T", "Ban player", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ DisplayGagPlayerMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_GagPlayer);
|
new Handle:menu = CreateMenu(MenuHandler_GagPlayer);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Gag/Mute Player", client);
|
Format(title, sizeof(title), "%T:", "Gag/Mute player", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ public AdminMenu_Gag(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Gag/Mute Player", param);
|
Format(buffer, maxlength, "%T", "Gag/Mute player", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
|
@ -51,8 +51,6 @@ new Handle:hTopMenu = INVALID_HANDLE;
|
|||||||
new Handle:g_MapList;
|
new Handle:g_MapList;
|
||||||
new g_mapFileTime;
|
new g_mapFileTime;
|
||||||
|
|
||||||
new Handle:g_ConfigList;
|
|
||||||
|
|
||||||
#include "basecommands/kick.sp"
|
#include "basecommands/kick.sp"
|
||||||
#include "basecommands/reloadadmins.sp"
|
#include "basecommands/reloadadmins.sp"
|
||||||
#include "basecommands/cancelvote.sp"
|
#include "basecommands/cancelvote.sp"
|
||||||
@ -93,15 +91,6 @@ public OnMapStart()
|
|||||||
ParseConfigs();
|
ParseConfigs();
|
||||||
}
|
}
|
||||||
|
|
||||||
public OnMapEnd()
|
|
||||||
{
|
|
||||||
if (g_ConfigList != INVALID_HANDLE)
|
|
||||||
{
|
|
||||||
CloseHandle(g_ConfigList);
|
|
||||||
g_ConfigList = INVALID_HANDLE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public OnAdminMenuReady(Handle:topmenu)
|
public OnAdminMenuReady(Handle:topmenu)
|
||||||
{
|
{
|
||||||
/* Block us from being called twice */
|
/* Block us from being called twice */
|
||||||
@ -127,7 +116,7 @@ public OnAdminMenuReady(Handle:topmenu)
|
|||||||
ADMFLAG_KICK);
|
ADMFLAG_KICK);
|
||||||
|
|
||||||
AddToTopMenu(hTopMenu,
|
AddToTopMenu(hTopMenu,
|
||||||
"Get Info",
|
"Identify",
|
||||||
TopMenuObject_Item,
|
TopMenuObject_Item,
|
||||||
AdminMenu_Who,
|
AdminMenu_Who,
|
||||||
player_commands,
|
player_commands,
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
new Handle:g_ConfigMenu = INVALID_HANDLE;
|
||||||
|
|
||||||
PerformExec(client, String:path[])
|
PerformExec(client, String:path[])
|
||||||
{
|
{
|
||||||
if (!FileExists(path))
|
if (!FileExists(path))
|
||||||
@ -26,7 +28,7 @@ public AdminMenu_ExecCFG(Handle:topmenu,
|
|||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
DisplayMenu(g_ConfigList, param, MENU_TIME_FOREVER);
|
DisplayMenu(g_ConfigMenu, param, MENU_TIME_FOREVER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,18 +67,27 @@ public Action:Command_ExecCfg(client, args)
|
|||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
new Handle:config_parser = INVALID_HANDLE;
|
||||||
ParseConfigs()
|
ParseConfigs()
|
||||||
{
|
{
|
||||||
new Handle:list = SMC_CreateParser();
|
if (config_parser == INVALID_HANDLE)
|
||||||
SMC_SetReaders(list, NewSection, KeyValue, EndSection);
|
{
|
||||||
SMC_SetParseEnd(list, ParseEnd);
|
config_parser = SMC_CreateParser();
|
||||||
|
}
|
||||||
|
|
||||||
new Handle:menu = CreateMenu(MenuHandler_ExecCFG);
|
SMC_SetReaders(config_parser, NewSection, KeyValue, EndSection);
|
||||||
SetMenuTitle(menu, "Choose Config");
|
|
||||||
SetMenuExitBackButton(menu, true);
|
if (g_ConfigMenu != INVALID_HANDLE)
|
||||||
|
{
|
||||||
|
CloseHandle(g_ConfigMenu);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_ConfigMenu = CreateMenu(MenuHandler_ExecCFG);
|
||||||
|
SetMenuTitle(g_ConfigMenu, "Choose Config");
|
||||||
|
SetMenuExitBackButton(g_ConfigMenu, true);
|
||||||
|
|
||||||
decl String:configPath[256];
|
decl String:configPath[256];
|
||||||
BuildPath(Path_SM, configPath, sizeof(configPath), "configs/menu_configs.cfg");
|
BuildPath(Path_SM, configPath, sizeof(configPath), "configs/adminmenu_cfgs.txt");
|
||||||
|
|
||||||
if (!FileExists(configPath))
|
if (!FileExists(configPath))
|
||||||
{
|
{
|
||||||
@ -85,9 +96,15 @@ ParseConfigs()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_ConfigList = menu;
|
new line;
|
||||||
|
new SMCError:err = SMC_ParseFile(config_parser, configPath, line);
|
||||||
SMC_ParseFile(list, configPath);
|
if (err != SMCError_Okay)
|
||||||
|
{
|
||||||
|
decl String:error[256];
|
||||||
|
SMC_GetErrorString(err, error, sizeof(error));
|
||||||
|
LogError("Could not parse file (line %d, file \"%s\"):", line, configPath);
|
||||||
|
LogError("Parser encountered error: %s", error);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -99,18 +116,10 @@ public SMCResult:NewSection(Handle:smc, const String:name[], bool:opt_quotes)
|
|||||||
|
|
||||||
public SMCResult:KeyValue(Handle:smc, const String:key[], const String:value[], bool:key_quotes, bool:value_quotes)
|
public SMCResult:KeyValue(Handle:smc, const String:key[], const String:value[], bool:key_quotes, bool:value_quotes)
|
||||||
{
|
{
|
||||||
AddMenuItem(g_ConfigList, key, value);
|
AddMenuItem(g_ConfigMenu, key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SMCResult:EndSection(Handle:smc)
|
public SMCResult:EndSection(Handle:smc)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ParseEnd(Handle:smc, bool:halted, bool:failed)
|
|
||||||
{
|
|
||||||
if (halted || failed)
|
|
||||||
LogError("Reading of configs file failed");
|
|
||||||
|
|
||||||
CloseHandle(smc);
|
|
||||||
}
|
|
@ -85,7 +85,7 @@ public Action:Timer_ChangeMap(Handle:timer, Handle:dp)
|
|||||||
LoadMaps(Handle:menu)
|
LoadMaps(Handle:menu)
|
||||||
{
|
{
|
||||||
decl String:mapPath[256];
|
decl String:mapPath[256];
|
||||||
BuildPath(Path_SM, mapPath, sizeof(mapPath), "configs/menu_maplist.ini");
|
BuildPath(Path_SM, mapPath, sizeof(mapPath), "configs/adminmenu_maplist.ini");
|
||||||
|
|
||||||
if (!FileExists(mapPath))
|
if (!FileExists(mapPath))
|
||||||
{
|
{
|
||||||
@ -113,8 +113,6 @@ LoadMaps(Handle:menu)
|
|||||||
RemoveAllMenuItems(menu);
|
RemoveAllMenuItems(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
LogMessage("[SM] Loading menu map list file [%s]", mapPath);
|
|
||||||
|
|
||||||
new Handle:file = OpenFile(mapPath, "rt");
|
new Handle:file = OpenFile(mapPath, "rt");
|
||||||
if (file == INVALID_HANDLE)
|
if (file == INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ DisplayWhoMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_Who);
|
new Handle:menu = CreateMenu(MenuHandler_Who);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Check player access", client);
|
Format(title, sizeof(title), "%T:", "Identify player", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ public AdminMenu_Who(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Check player access", param);
|
Format(buffer, maxlength, "%T", "Identify player", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ PerformBurn(client, target, Float:seconds)
|
|||||||
|
|
||||||
if (!IsPlayerAlive(target))
|
if (!IsPlayerAlive(target))
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "[SM] %t", "Cannot performed on dead", name);
|
ReplyToCommand(client, "[SM] %t", "Cannot be performed on dead", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ DisplayBurnMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_Burn);
|
new Handle:menu = CreateMenu(MenuHandler_Burn);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Burn Player", client);
|
Format(title, sizeof(title), "%T:", "Burn player", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ public AdminMenu_Burn(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Burn Player", param);
|
Format(buffer, maxlength, "%T", "Burn player", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ PerformSlap(client, target, damage)
|
|||||||
|
|
||||||
if (!IsPlayerAlive(target))
|
if (!IsPlayerAlive(target))
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "[SM] %t", "Cannot performed on dead", name);
|
ReplyToCommand(client, "[SM] %t", "Cannot be performed on dead", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ DisplaySlapDamageMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_SlapDamage);
|
new Handle:menu = CreateMenu(MenuHandler_SlapDamage);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Slap Damage", client);
|
Format(title, sizeof(title), "%T:", "Slap damage", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ DisplaySlapTargetMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_Slap);
|
new Handle:menu = CreateMenu(MenuHandler_Slap);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Slap Player", client);
|
Format(title, sizeof(title), "%T:", "Slap player", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ public AdminMenu_Slap(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Slap Player", param);
|
Format(buffer, maxlength, "%T", "Slap player", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ PerformSlay(client, target)
|
|||||||
|
|
||||||
if (!IsPlayerAlive(target))
|
if (!IsPlayerAlive(target))
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "[SM] %t", "Cannot performed on dead", name);
|
ReplyToCommand(client, "[SM] %t", "Cannot be performed on dead", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ public OnAdminMenuReady(Handle:topmenu)
|
|||||||
if (voting_commands != INVALID_TOPMENUOBJECT)
|
if (voting_commands != INVALID_TOPMENUOBJECT)
|
||||||
{
|
{
|
||||||
AddToTopMenu(hTopMenu,
|
AddToTopMenu(hTopMenu,
|
||||||
"Vote Gravity",
|
"Gravity Vote",
|
||||||
TopMenuObject_Item,
|
TopMenuObject_Item,
|
||||||
AdminMenu_VoteGravity,
|
AdminMenu_VoteGravity,
|
||||||
voting_commands,
|
voting_commands,
|
||||||
@ -154,7 +154,7 @@ public OnAdminMenuReady(Handle:topmenu)
|
|||||||
ADMFLAG_VOTE);
|
ADMFLAG_VOTE);
|
||||||
|
|
||||||
AddToTopMenu(hTopMenu,
|
AddToTopMenu(hTopMenu,
|
||||||
"Vote Burn",
|
"Burn Vote",
|
||||||
TopMenuObject_Item,
|
TopMenuObject_Item,
|
||||||
AdminMenu_VoteBurn,
|
AdminMenu_VoteBurn,
|
||||||
voting_commands,
|
voting_commands,
|
||||||
@ -162,7 +162,7 @@ public OnAdminMenuReady(Handle:topmenu)
|
|||||||
ADMFLAG_VOTE|ADMFLAG_SLAY);
|
ADMFLAG_VOTE|ADMFLAG_SLAY);
|
||||||
|
|
||||||
AddToTopMenu(hTopMenu,
|
AddToTopMenu(hTopMenu,
|
||||||
"Vote Slay",
|
"Slay Vote",
|
||||||
TopMenuObject_Item,
|
TopMenuObject_Item,
|
||||||
AdminMenu_VoteSlay,
|
AdminMenu_VoteSlay,
|
||||||
voting_commands,
|
voting_commands,
|
||||||
@ -170,7 +170,7 @@ public OnAdminMenuReady(Handle:topmenu)
|
|||||||
ADMFLAG_VOTE|ADMFLAG_SLAY);
|
ADMFLAG_VOTE|ADMFLAG_SLAY);
|
||||||
|
|
||||||
AddToTopMenu(hTopMenu,
|
AddToTopMenu(hTopMenu,
|
||||||
"Vote AllTalk",
|
"Alltalk Vote",
|
||||||
TopMenuObject_Item,
|
TopMenuObject_Item,
|
||||||
AdminMenu_VoteAllTalk,
|
AdminMenu_VoteAllTalk,
|
||||||
voting_commands,
|
voting_commands,
|
||||||
@ -178,7 +178,7 @@ public OnAdminMenuReady(Handle:topmenu)
|
|||||||
ADMFLAG_VOTE);
|
ADMFLAG_VOTE);
|
||||||
|
|
||||||
AddToTopMenu(hTopMenu,
|
AddToTopMenu(hTopMenu,
|
||||||
"Vote FF",
|
"FF Vote",
|
||||||
TopMenuObject_Item,
|
TopMenuObject_Item,
|
||||||
AdminMenu_VoteFF,
|
AdminMenu_VoteFF,
|
||||||
voting_commands,
|
voting_commands,
|
||||||
|
@ -44,7 +44,7 @@ public AdminMenu_VoteAllTalk(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Vote AllTalk", param);
|
Format(buffer, maxlength, "%T", "Alltalk vote", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@ DisplayVoteBurnMenu(client,target,String:name[])
|
|||||||
{
|
{
|
||||||
if (!IsPlayerAlive(target))
|
if (!IsPlayerAlive(target))
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "[SM] %t", "Cannot performed on dead", name);
|
ReplyToCommand(client, "[SM] %t", "Cannot be performed on dead", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ DisplayVoteBurnMenu(client,target,String:name[])
|
|||||||
g_voteType = voteType:burn;
|
g_voteType = voteType:burn;
|
||||||
|
|
||||||
g_hVoteMenu = CreateMenu(Handler_VoteCallback, MenuAction:MENU_ACTIONS_ALL);
|
g_hVoteMenu = CreateMenu(Handler_VoteCallback, MenuAction:MENU_ACTIONS_ALL);
|
||||||
SetMenuTitle(g_hVoteMenu, "Voteburn Player");
|
SetMenuTitle(g_hVoteMenu, "Voteburn player");
|
||||||
AddMenuItem(g_hVoteMenu, VOTE_YES, "Yes");
|
AddMenuItem(g_hVoteMenu, VOTE_YES, "Yes");
|
||||||
AddMenuItem(g_hVoteMenu, VOTE_NO, "No");
|
AddMenuItem(g_hVoteMenu, VOTE_NO, "No");
|
||||||
SetMenuExitButton(g_hVoteMenu, false);
|
SetMenuExitButton(g_hVoteMenu, false);
|
||||||
@ -27,7 +27,7 @@ DisplayBurnTargetMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_Burn);
|
new Handle:menu = CreateMenu(MenuHandler_Burn);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Vote Burn", client);
|
Format(title, sizeof(title), "%T:", "Burn vote", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ public AdminMenu_VoteBurn(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Vote Burn", param);
|
Format(buffer, maxlength, "%T", "Burn vote", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
@ -87,6 +87,10 @@ public MenuHandler_Burn(Handle:menu, MenuAction:action, param1, param2)
|
|||||||
{
|
{
|
||||||
PrintToChat(param1, "[SM] %t", "Unable to target");
|
PrintToChat(param1, "[SM] %t", "Unable to target");
|
||||||
}
|
}
|
||||||
|
else if (!IsPlayerAlive(target))
|
||||||
|
{
|
||||||
|
PrintToChat(param1, "[SM] %t", "Player has since died");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DisplayVoteBurnMenu(param1, target, name);
|
DisplayVoteBurnMenu(param1, target, name);
|
||||||
|
@ -40,7 +40,7 @@ public AdminMenu_VoteGravity(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Vote Gravity", param);
|
Format(buffer, maxlength, "%T", "Gravity vote", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@ DisplayVoteSlayMenu(client,target,String:name[])
|
|||||||
{
|
{
|
||||||
if (!IsPlayerAlive(target))
|
if (!IsPlayerAlive(target))
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "[SM] %t", "Cannot performed on dead", name);
|
ReplyToCommand(client, "[SM] %t", "Cannot be performed on dead", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ DisplaySlayTargetMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_Slay);
|
new Handle:menu = CreateMenu(MenuHandler_Slay);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Vote Slay", client);
|
Format(title, sizeof(title), "%T:", "Slay vote", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ public AdminMenu_VoteSlay(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Vote Slay", param);
|
Format(buffer, maxlength, "%T", "Slay vote", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
@ -88,6 +88,10 @@ public MenuHandler_Slay(Handle:menu, MenuAction:action, param1, param2)
|
|||||||
{
|
{
|
||||||
PrintToChat(param1, "[SM] %t", "Unable to target");
|
PrintToChat(param1, "[SM] %t", "Unable to target");
|
||||||
}
|
}
|
||||||
|
else if (!IsPlayerAlive(target))
|
||||||
|
{
|
||||||
|
PrintToChat(param1, "[SM] %t", "Player has since died");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DisplayVoteSlayMenu(param1, target, name);
|
DisplayVoteSlayMenu(param1, target, name);
|
||||||
|
@ -156,7 +156,7 @@ public OnAdminMenuReady(Handle:topmenu)
|
|||||||
if (voting_commands != INVALID_TOPMENUOBJECT)
|
if (voting_commands != INVALID_TOPMENUOBJECT)
|
||||||
{
|
{
|
||||||
AddToTopMenu(hTopMenu,
|
AddToTopMenu(hTopMenu,
|
||||||
"Vote Kick",
|
"Kick Vote",
|
||||||
TopMenuObject_Item,
|
TopMenuObject_Item,
|
||||||
AdminMenu_VoteKick,
|
AdminMenu_VoteKick,
|
||||||
voting_commands,
|
voting_commands,
|
||||||
@ -164,7 +164,7 @@ public OnAdminMenuReady(Handle:topmenu)
|
|||||||
ADMFLAG_VOTE|ADMFLAG_KICK);
|
ADMFLAG_VOTE|ADMFLAG_KICK);
|
||||||
|
|
||||||
AddToTopMenu(hTopMenu,
|
AddToTopMenu(hTopMenu,
|
||||||
"Vote Ban",
|
"Ban Vote",
|
||||||
TopMenuObject_Item,
|
TopMenuObject_Item,
|
||||||
AdminMenu_VoteBan,
|
AdminMenu_VoteBan,
|
||||||
voting_commands,
|
voting_commands,
|
||||||
@ -172,7 +172,7 @@ public OnAdminMenuReady(Handle:topmenu)
|
|||||||
ADMFLAG_VOTE|ADMFLAG_BAN);
|
ADMFLAG_VOTE|ADMFLAG_BAN);
|
||||||
|
|
||||||
AddToTopMenu(hTopMenu,
|
AddToTopMenu(hTopMenu,
|
||||||
"Vote Map",
|
"Map Vote",
|
||||||
TopMenuObject_Item,
|
TopMenuObject_Item,
|
||||||
AdminMenu_VoteMap,
|
AdminMenu_VoteMap,
|
||||||
voting_commands,
|
voting_commands,
|
||||||
|
@ -26,7 +26,7 @@ DisplayBanTargetMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_Ban);
|
new Handle:menu = CreateMenu(MenuHandler_Ban);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Vote Ban", client);
|
Format(title, sizeof(title), "%T:", "Ban vote", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ public AdminMenu_VoteBan(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Vote Ban", param);
|
Format(buffer, maxlength, "%T", "Ban vote", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ DisplayKickTargetMenu(client)
|
|||||||
new Handle:menu = CreateMenu(MenuHandler_Kick);
|
new Handle:menu = CreateMenu(MenuHandler_Kick);
|
||||||
|
|
||||||
decl String:title[100];
|
decl String:title[100];
|
||||||
Format(title, sizeof(title), "%T:", "Vote Kick", client);
|
Format(title, sizeof(title), "%T:", "Kick vote", client);
|
||||||
SetMenuTitle(menu, title);
|
SetMenuTitle(menu, title);
|
||||||
SetMenuExitBackButton(menu, true);
|
SetMenuExitBackButton(menu, true);
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ public AdminMenu_VoteKick(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Vote Kick", param);
|
Format(buffer, maxlength, "%T", "Kick vote", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
|
@ -132,7 +132,7 @@ public AdminMenu_VoteMap(Handle:topmenu,
|
|||||||
{
|
{
|
||||||
if (action == TopMenuAction_DisplayOption)
|
if (action == TopMenuAction_DisplayOption)
|
||||||
{
|
{
|
||||||
Format(buffer, maxlength, "%T", "Vote Map", param);
|
Format(buffer, maxlength, "%T", "Map vote", param);
|
||||||
}
|
}
|
||||||
else if (action == TopMenuAction_SelectOption)
|
else if (action == TopMenuAction_SelectOption)
|
||||||
{
|
{
|
||||||
@ -200,7 +200,7 @@ public Action:Command_Votemap(client, args)
|
|||||||
LoadMaps(Handle:menu)
|
LoadMaps(Handle:menu)
|
||||||
{
|
{
|
||||||
decl String:mapPath[256];
|
decl String:mapPath[256];
|
||||||
BuildPath(Path_SM, mapPath, sizeof(mapPath), "configs/menu_maplist.ini");
|
BuildPath(Path_SM, mapPath, sizeof(mapPath), "configs/adminmenu_maplist.ini");
|
||||||
|
|
||||||
if (!FileExists(mapPath))
|
if (!FileExists(mapPath))
|
||||||
{
|
{
|
||||||
@ -228,8 +228,6 @@ LoadMaps(Handle:menu)
|
|||||||
RemoveAllMenuItems(menu);
|
RemoveAllMenuItems(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
LogMessage("[SM] Loading menu map list file [%s]", mapPath);
|
|
||||||
|
|
||||||
new Handle:file = OpenFile(mapPath, "rt");
|
new Handle:file = OpenFile(mapPath, "rt");
|
||||||
if (file == INVALID_HANDLE)
|
if (file == INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
|
@ -8,13 +8,13 @@
|
|||||||
"Initiated Vote Burn"
|
"Initiated Vote Burn"
|
||||||
{
|
{
|
||||||
"#format" "{1:s}"
|
"#format" "{1:s}"
|
||||||
"en" "Initiated a voteburn against {1}."
|
"en" "Initiated a burn vote against {1}."
|
||||||
}
|
}
|
||||||
|
|
||||||
"Initiated Vote Slay"
|
"Initiated Vote Slay"
|
||||||
{
|
{
|
||||||
"#format" "{1:s}"
|
"#format" "{1:s}"
|
||||||
"en" "Initiated a voteslay against {1}."
|
"en" "Initiated a slay vote against {1}."
|
||||||
}
|
}
|
||||||
|
|
||||||
"Initiated Vote Alltalk"
|
"Initiated Vote Alltalk"
|
||||||
@ -30,7 +30,7 @@
|
|||||||
"Gravity Vote"
|
"Gravity Vote"
|
||||||
{
|
{
|
||||||
"#format" "{1:s}"
|
"#format" "{1:s}"
|
||||||
"en" "Gravity Vote: {1}"
|
"en" "Gravity vote: {1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Change Gravity To"
|
"Change Gravity To"
|
||||||
@ -39,10 +39,10 @@
|
|||||||
"en" "Change gravity to {1}?"
|
"en" "Change gravity to {1}?"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Voteburn Player"
|
"Voteburn player"
|
||||||
{
|
{
|
||||||
"#format" "{1:s}"
|
"#format" "{1:s}"
|
||||||
"en" "Burn {1}?"
|
"en" "Burn player {1}?"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Voteslay Player"
|
"Voteslay Player"
|
||||||
@ -74,25 +74,30 @@
|
|||||||
"#format" "{1:s}"
|
"#format" "{1:s}"
|
||||||
"en" "Turn friendly fire on? {1}"
|
"en" "Turn friendly fire on? {1}"
|
||||||
}
|
}
|
||||||
"Vote Gravity"
|
|
||||||
|
"Gravity vote"
|
||||||
{
|
{
|
||||||
"en" "Vote Gravity"
|
"en" "Gravity vote"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Vote FF"
|
"Vote FF"
|
||||||
{
|
{
|
||||||
"en" "Vote FF"
|
"en" "Vote FF"
|
||||||
}
|
}
|
||||||
"Vote Burn"
|
|
||||||
|
"Burn vote"
|
||||||
{
|
{
|
||||||
"en" "Vote Burn"
|
"en" "Burn vote"
|
||||||
}
|
}
|
||||||
"Vote AllTalk"
|
|
||||||
|
"Alltalk vote"
|
||||||
{
|
{
|
||||||
"en" "Vote AllTalk"
|
"en" "Alltalk vote"
|
||||||
}
|
}
|
||||||
"Vote Slay"
|
|
||||||
|
"Slay vote"
|
||||||
{
|
{
|
||||||
"en" "Vote Slay"
|
"en" "Slay vote"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -8,19 +8,19 @@
|
|||||||
|
|
||||||
"Initiated Vote Map"
|
"Initiated Vote Map"
|
||||||
{
|
{
|
||||||
"en" "Initiated a votemap."
|
"en" "Initiated a map vote."
|
||||||
}
|
}
|
||||||
|
|
||||||
"Initiated Vote Kick"
|
"Initiated Vote Kick"
|
||||||
{
|
{
|
||||||
"#format" "{1:s}"
|
"#format" "{1:s}"
|
||||||
"en" "Initiated a votekick against {1}."
|
"en" "Initiated a kick vote against {1}."
|
||||||
}
|
}
|
||||||
|
|
||||||
"Initiated Vote Ban"
|
"Initiated Vote Ban"
|
||||||
{
|
{
|
||||||
"#format" "{1:s}"
|
"#format" "{1:s}"
|
||||||
"en" "Initiated a voteban against {1}."
|
"en" "Initiated a ban vote against {1}."
|
||||||
}
|
}
|
||||||
|
|
||||||
"Map Vote"
|
"Map Vote"
|
||||||
@ -64,17 +64,17 @@
|
|||||||
"#format" "{1:s},{2:s}"
|
"#format" "{1:s},{2:s}"
|
||||||
"en" "The answer to {1} is: {2}."
|
"en" "The answer to {1} is: {2}."
|
||||||
}
|
}
|
||||||
"Vote Kick"
|
"Kick vote"
|
||||||
{
|
{
|
||||||
"en" "Vote Kick"
|
"en" "Kick vote"
|
||||||
}
|
}
|
||||||
"Vote Ban"
|
"Ban vote"
|
||||||
{
|
{
|
||||||
"en" "Vote Ban"
|
"en" "Ban vote"
|
||||||
}
|
}
|
||||||
"Vote Map"
|
"Map vote"
|
||||||
{
|
{
|
||||||
"en" "Vote Map"
|
"en" "Map vote"
|
||||||
}
|
}
|
||||||
"Confirm Vote"
|
"Confirm Vote"
|
||||||
{
|
{
|
||||||
|
@ -187,12 +187,18 @@
|
|||||||
"en" "Invalid amount specified"
|
"en" "Invalid amount specified"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Cannot performed on dead"
|
"Cannot be performed on dead"
|
||||||
{
|
{
|
||||||
"#format" "{1:s}"
|
"#format" "{1:s}"
|
||||||
"en" "This action cannot be performed on a dead client \"{1}\""
|
"en" "This action cannot be performed on a dead client \"{1}\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"Player has since died"
|
||||||
|
{
|
||||||
|
"#format" "{1:s}"
|
||||||
|
"en" "Action cannot be performed, the player has since died."
|
||||||
|
}
|
||||||
|
|
||||||
"Vote in Progress"
|
"Vote in Progress"
|
||||||
{
|
{
|
||||||
"en" "A vote is already in progress."
|
"en" "A vote is already in progress."
|
||||||
@ -280,24 +286,24 @@
|
|||||||
{
|
{
|
||||||
"en" "Reload admins"
|
"en" "Reload admins"
|
||||||
}
|
}
|
||||||
"Ban Player"
|
"Ban player"
|
||||||
{
|
{
|
||||||
"en" "Ban Player"
|
"en" "Ban player"
|
||||||
}
|
}
|
||||||
"Ban Reason"
|
"Ban reason"
|
||||||
{
|
{
|
||||||
"en" "Ban Reason"
|
"en" "Ban reason"
|
||||||
}
|
}
|
||||||
"Burn Player"
|
"Burn player"
|
||||||
{
|
{
|
||||||
"en" "Burn Player"
|
"en" "Burn player"
|
||||||
}
|
}
|
||||||
"Slap Player"
|
"Slap player"
|
||||||
{
|
{
|
||||||
"en" "Slap Player"
|
"en" "Slap player"
|
||||||
}
|
}
|
||||||
"Slap Damage"
|
"Slap damage"
|
||||||
{
|
{
|
||||||
"en" "Slap Damage"
|
"en" "Slap damage"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -74,9 +74,9 @@
|
|||||||
{
|
{
|
||||||
"en" "Admin cache has been refreshed."
|
"en" "Admin cache has been refreshed."
|
||||||
}
|
}
|
||||||
"Check player access"
|
"Identify player"
|
||||||
{
|
{
|
||||||
"en" "Check player access"
|
"en" "Identify player"
|
||||||
}
|
}
|
||||||
"Choose Map"
|
"Choose Map"
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user