- moved more translation phrases around
- converted more code to ProcessTargetString() --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401631
This commit is contained in:
parent
53156446d4
commit
ef6da943d6
@ -68,6 +68,7 @@ public bool:AskPluginLoad(Handle:myself, bool:late, String:error[], err_max)
|
||||
public OnPluginStart()
|
||||
{
|
||||
LoadTranslations("common.phrases");
|
||||
LoadTranslations("adminmenu.phrases");
|
||||
|
||||
hOnAdminMenuCreated = CreateGlobalForward("OnAdminMenuCreated", ET_Ignore, Param_Cell);
|
||||
hOnAdminMenuReady = CreateGlobalForward("OnAdminMenuReady", ET_Ignore, Param_Cell);
|
||||
|
@ -56,6 +56,7 @@ new g_BanTime[MAXPLAYERS+1];
|
||||
public OnPluginStart()
|
||||
{
|
||||
LoadTranslations("common.phrases");
|
||||
LoadTranslations("basebans.phrases");
|
||||
|
||||
RegAdminCmd("sm_ban", Command_Ban, ADMFLAG_BAN, "sm_ban <#userid|name> <minutes|0> [reason]");
|
||||
RegAdminCmd("sm_unban", Command_Unban, ADMFLAG_UNBAN, "sm_unban <steamid>");
|
||||
|
@ -112,7 +112,7 @@ public Action:Command_Burn(client, args)
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
COMMAND_FILTER_NO_BOTS,
|
||||
COMMAND_FILTER_ALIVE,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
tn_is_ml)) <= 0)
|
||||
|
@ -155,7 +155,7 @@ public Action:Command_Slap(client, args)
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
COMMAND_FILTER_NO_BOTS,
|
||||
COMMAND_FILTER_ALIVE,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
tn_is_ml)) <= 0)
|
||||
|
@ -100,7 +100,7 @@ public Action:Command_Slay(client, args)
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
COMMAND_FILTER_NO_BOTS,
|
||||
COMMAND_FILTER_ALIVE,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
tn_is_ml)) <= 0)
|
||||
|
@ -269,7 +269,7 @@ public Handler_VoteCallback(Handle:menu, MenuAction:action, param1, param2)
|
||||
|
||||
case (voteType:burn):
|
||||
{
|
||||
PrintToChatAll("[SM] %t", "Ignited player", g_voteInfo[VOTE_NAME]);
|
||||
PrintToChatAll("[SM] %t", "Set target on fire", "_s", g_voteInfo[VOTE_NAME]);
|
||||
LogAction(-1, g_voteClient[VOTE_CLIENTID], "Vote burn successful, igniting \"%L\"", g_voteClient[VOTE_CLIENTID]);
|
||||
|
||||
IgniteEntity(g_voteClient[VOTE_CLIENTID], 19.8);
|
||||
|
@ -12,7 +12,7 @@ DisplayVoteAllTalkMenu(client)
|
||||
}
|
||||
|
||||
LogAction(client, -1, "\"%L\" initiated an alltalk vote.", client);
|
||||
ShowActivity(client, "%t", "Initiated Vote Alltalk");
|
||||
ShowActivity2(client, "[SM] ", "%t", "Initiated Vote Alltalk");
|
||||
|
||||
g_voteType = voteType:alltalk;
|
||||
g_voteInfo[VOTE_NAME][0] = '\0';
|
||||
|
@ -1,4 +1,4 @@
|
||||
DisplayVoteBurnMenu(client,target,String:name[])
|
||||
DisplayVoteBurnMenu(client, target, String:name[])
|
||||
{
|
||||
if (!IsPlayerAlive(target))
|
||||
{
|
||||
@ -10,7 +10,7 @@ DisplayVoteBurnMenu(client,target,String:name[])
|
||||
GetClientName(target, g_voteInfo[VOTE_NAME], sizeof(g_voteInfo[]));
|
||||
|
||||
LogAction(client, target, "\"%L\" initiated a burn vote against \"%L\"", client, target);
|
||||
ShowActivity(client, "%t", "Initiated Vote Burn", g_voteInfo[VOTE_NAME]);
|
||||
ShowActivity2(client, "[SM] ", "%t", "Initiated Vote Burn", g_voteInfo[VOTE_NAME]);
|
||||
|
||||
g_voteType = voteType:burn;
|
||||
|
||||
@ -122,13 +122,24 @@ public Action:Command_VoteBurn(client, args)
|
||||
|
||||
BreakString(text, arg, sizeof(arg));
|
||||
|
||||
new target = FindTarget(client, arg);
|
||||
if (target == -1)
|
||||
decl String:target_name[MAX_TARGET_LENGTH];
|
||||
decl target_list[MAXPLAYERS], target_count, bool:tn_is_ml;
|
||||
|
||||
if ((target_count = ProcessTargetString(
|
||||
arg,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
COMMAND_FILTER_NO_MULTI,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
tn_is_ml)) <= 0)
|
||||
{
|
||||
ReplyToTargetError(client, target_count);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
DisplayVoteBurnMenu(client, target, arg);
|
||||
DisplayVoteBurnMenu(client, target_list[0], arg);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ DisplayVoteFFMenu(client)
|
||||
}
|
||||
|
||||
LogAction(client, -1, "\"%L\" initiated a friendly fire vote.", client);
|
||||
ShowActivity(client, "%t", "Initiated Vote FF");
|
||||
ShowActivity2(client, "[SM] ", "%t", "Initiated Vote FF");
|
||||
|
||||
g_voteType = voteType:ff;
|
||||
g_voteInfo[VOTE_NAME][0] = '\0';
|
||||
|
@ -2,7 +2,7 @@
|
||||
DisplayVoteGravityMenu(client,count,String:items[5][])
|
||||
{
|
||||
LogAction(client, -1, "\"%L\" initiated a gravity vote.", client);
|
||||
ShowActivity(client, "%t", "Initiated Vote Gravity");
|
||||
ShowActivity2(client, "[SM] ", "%t", "Initiated Vote Gravity");
|
||||
|
||||
g_voteType = voteType:gravity;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
DisplayVoteSlayMenu(client,target,String:name[])
|
||||
DisplayVoteSlayMenu(client, target, String:name[])
|
||||
{
|
||||
if (!IsPlayerAlive(target))
|
||||
{
|
||||
@ -11,7 +11,7 @@ DisplayVoteSlayMenu(client,target,String:name[])
|
||||
GetClientName(target, g_voteInfo[VOTE_NAME], sizeof(g_voteInfo[]));
|
||||
|
||||
LogAction(client, target, "\"%L\" initiated a slay vote against \"%L\"", client, target);
|
||||
ShowActivity(client, "%t", "Initiated Vote Slay", g_voteInfo[VOTE_NAME]);
|
||||
ShowActivity2(client, "[SM] ", "%t", "Initiated Vote Slay", g_voteInfo[VOTE_NAME]);
|
||||
|
||||
g_voteType = voteType:slay;
|
||||
|
||||
@ -123,13 +123,24 @@ public Action:Command_VoteSlay(client, args)
|
||||
|
||||
BreakString(text, arg, sizeof(arg));
|
||||
|
||||
new target = FindTarget(client, arg);
|
||||
if (target == -1)
|
||||
decl String:target_name[MAX_TARGET_LENGTH];
|
||||
decl target_list[MAXPLAYERS], target_count, bool:tn_is_ml;
|
||||
|
||||
if ((target_count = ProcessTargetString(
|
||||
arg,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
COMMAND_FILTER_NO_MULTI,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
tn_is_ml)) <= 0)
|
||||
{
|
||||
ReplyToTargetError(client, target_count);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
DisplayVoteSlayMenu(client, target, arg);
|
||||
DisplayVoteSlayMenu(client, target_list[0], arg);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
}
|
||||
|
@ -100,6 +100,8 @@ public OnPluginStart()
|
||||
{
|
||||
LoadTranslations("common.phrases");
|
||||
LoadTranslations("basevotes.phrases");
|
||||
LoadTranslations("plugin.basecommands");
|
||||
LoadTranslations("basebans.phrases");
|
||||
|
||||
RegAdminCmd("sm_votemap", Command_Votemap, ADMFLAG_VOTE|ADMFLAG_CHANGEMAP, "sm_votemap <mapname> [mapname2] ... [mapname5] ");
|
||||
RegAdminCmd("sm_votekick", Command_Votekick, ADMFLAG_VOTE|ADMFLAG_KICK, "sm_votekick <player> [reason]");
|
||||
@ -220,7 +222,7 @@ public Action:Command_Vote(client, args)
|
||||
}
|
||||
|
||||
LogAction(client, -1, "\"%L\" initiated a generic vote.", client);
|
||||
ShowActivity(client, "%t", "Initiate Vote", g_voteArg);
|
||||
ShowActivity2(client, "[SM] ", "%t", "Initiate Vote", g_voteArg);
|
||||
|
||||
g_voteType = voteType:question;
|
||||
|
||||
@ -349,7 +351,7 @@ public Handler_VoteCallback(Handle:menu, MenuAction:action, param1, param2)
|
||||
strcopy(g_voteArg, sizeof(g_voteArg), "Votekicked");
|
||||
}
|
||||
|
||||
PrintToChatAll("[SM] %t", "Kicked player", g_voteInfo[VOTE_NAME]);
|
||||
PrintToChatAll("[SM] %t", "Kicked target", "_s", g_voteInfo[VOTE_NAME]);
|
||||
LogAction(-1, g_voteClient[VOTE_CLIENTID], "Vote kick successful, kicked \"%L\" (reason \"%s\")", g_voteClient[VOTE_CLIENTID], g_voteArg);
|
||||
|
||||
ServerCommand("kickid %d \"%s\"", g_voteClient[VOTE_USERID], g_voteArg);
|
||||
|
@ -9,7 +9,7 @@ DisplayVoteBanMenu(client, target)
|
||||
GetClientIP(target, g_voteInfo[VOTE_IP], sizeof(g_voteInfo[]));
|
||||
|
||||
LogAction(client, target, "\"%L\" initiated a ban vote against \"%L\"", client, target);
|
||||
ShowActivity(client, "%t", "Initiated Vote Ban", g_voteInfo[VOTE_NAME]);
|
||||
ShowActivity2(client, "[SM] ", "%t", "Initiated Vote Ban", g_voteInfo[VOTE_NAME]);
|
||||
|
||||
g_voteType = voteType:ban;
|
||||
|
||||
@ -118,12 +118,6 @@ public Action:Command_Voteban(client, args)
|
||||
|
||||
new len = BreakString(text, arg, sizeof(arg));
|
||||
|
||||
new target = FindTarget(client, arg);
|
||||
if (target == -1)
|
||||
{
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
if (len != -1)
|
||||
{
|
||||
strcopy(g_voteArg, sizeof(g_voteArg), text[len]);
|
||||
@ -133,7 +127,24 @@ public Action:Command_Voteban(client, args)
|
||||
g_voteArg[0] = '\0';
|
||||
}
|
||||
|
||||
DisplayVoteBanMenu(client, target);
|
||||
decl String:target_name[MAX_TARGET_LENGTH];
|
||||
decl target_list[MAXPLAYERS], target_count, bool:tn_is_ml;
|
||||
|
||||
if ((target_count = ProcessTargetString(
|
||||
arg,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
COMMAND_FILTER_NO_MULTI,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
tn_is_ml)) <= 0)
|
||||
{
|
||||
ReplyToTargetError(client, target_count);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
DisplayVoteBanMenu(client, target_list[0]);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
DisplayVoteMapMenu(client, mapCount, String:maps[5][])
|
||||
{
|
||||
LogAction(client, -1, "\"%L\" initiated a map vote.", client);
|
||||
ShowActivity(client, "%t", "Initiated Vote Map");
|
||||
ShowActivity2(client, "[SM] ", "%t", "Initiated Vote Map");
|
||||
|
||||
g_voteType = voteType:map;
|
||||
|
||||
|
22
translations/adminmenu.phrases.txt
Normal file
22
translations/adminmenu.phrases.txt
Normal file
@ -0,0 +1,22 @@
|
||||
"Phrases"
|
||||
{
|
||||
"Admin Menu"
|
||||
{
|
||||
"en" "Admin Menu"
|
||||
}
|
||||
|
||||
"Player Commands"
|
||||
{
|
||||
"en" "Player Commands"
|
||||
}
|
||||
|
||||
"Server Commands"
|
||||
{
|
||||
"en" "Server Commands"
|
||||
}
|
||||
|
||||
"Voting Commands"
|
||||
{
|
||||
"en" "Voting Commands"
|
||||
}
|
||||
}
|
52
translations/basebans.phrases.txt
Normal file
52
translations/basebans.phrases.txt
Normal file
@ -0,0 +1,52 @@
|
||||
"Phrases"
|
||||
{
|
||||
"Ban player"
|
||||
{
|
||||
"en" "Ban player"
|
||||
}
|
||||
|
||||
"Ban reason"
|
||||
{
|
||||
"en" "Ban reason"
|
||||
}
|
||||
|
||||
"Permabanned player"
|
||||
{
|
||||
"#format" "{1:s}"
|
||||
"en" "Permanently banned player \"{1}\"."
|
||||
}
|
||||
|
||||
"Permabanned player reason"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "Permanently banned player \"{1}\" (reason: {2})."
|
||||
}
|
||||
|
||||
"Banned player"
|
||||
{
|
||||
"#format" "{1:s},{2:d}"
|
||||
"en" "Banned player \"{1}\" for {2} minutes."
|
||||
}
|
||||
|
||||
"Banned player reason"
|
||||
{
|
||||
"#format" "{1:s},{2:d},{3:s}"
|
||||
"en" "Banned player \"{1}\" for {2} minutes (reason: {3})."
|
||||
}
|
||||
|
||||
"Removed bans matching"
|
||||
{
|
||||
"#format" "{1:s}"
|
||||
"en" "Removed bans matching filter: {1}"
|
||||
}
|
||||
|
||||
"Ban added"
|
||||
{
|
||||
"en" "Ban has been added."
|
||||
}
|
||||
|
||||
"Cannot ban that IP"
|
||||
{
|
||||
"en" "You cannot ban that IP address."
|
||||
}
|
||||
}
|
@ -99,10 +99,4 @@
|
||||
{
|
||||
"en" "Slay vote"
|
||||
}
|
||||
|
||||
"Ignited player"
|
||||
{
|
||||
"#format" "{1:s}"
|
||||
"en" "Set player '{1}' on fire"
|
||||
}
|
||||
}
|
||||
|
@ -41,12 +41,6 @@
|
||||
"en" "Kick player"
|
||||
}
|
||||
|
||||
"Kicked player"
|
||||
{
|
||||
"#format" "{1:s}"
|
||||
"en" "Kicked player '{1}'"
|
||||
}
|
||||
|
||||
"Kicked by admin"
|
||||
{
|
||||
"en" "Kicked by administrator"
|
||||
@ -123,41 +117,6 @@
|
||||
"#format" "{1:s}"
|
||||
"en" "Executed config \"{1}\"."
|
||||
}
|
||||
|
||||
"Permabanned player"
|
||||
{
|
||||
"#format" "{1:s}"
|
||||
"en" "Permanently banned player \"{1}\"."
|
||||
}
|
||||
|
||||
"Permabanned player reason"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "Permanently banned player \"{1}\" (reason: {2})."
|
||||
}
|
||||
|
||||
"Banned player"
|
||||
{
|
||||
"#format" "{1:s},{2:d}"
|
||||
"en" "Banned player \"{1}\" for {2} minutes."
|
||||
}
|
||||
|
||||
"Banned player reason"
|
||||
{
|
||||
"#format" "{1:s},{2:d},{3:s}"
|
||||
"en" "Banned player \"{1}\" for {2} minutes (reason: {3})."
|
||||
}
|
||||
|
||||
"Removed bans matching"
|
||||
{
|
||||
"#format" "{1:s}"
|
||||
"en" "Removed bans matching filter: {1}"
|
||||
}
|
||||
|
||||
"Ban added"
|
||||
{
|
||||
"en" "Ban has been added."
|
||||
}
|
||||
|
||||
"Admin cache refreshed"
|
||||
{
|
||||
@ -232,52 +191,17 @@
|
||||
{
|
||||
"en" "Failed to query database."
|
||||
}
|
||||
|
||||
"Cannot ban that IP"
|
||||
{
|
||||
"en" "You cannot ban that IP address."
|
||||
}
|
||||
|
||||
"Invalid SteamID specified"
|
||||
{
|
||||
"en" "You have specified an invalid Steam ID (must start with 'STEAM_0:')."
|
||||
}
|
||||
|
||||
"Admin Menu"
|
||||
{
|
||||
"en" "Admin Menu"
|
||||
}
|
||||
|
||||
"Player Commands"
|
||||
{
|
||||
"en" "Player Commands"
|
||||
}
|
||||
|
||||
"Server Commands"
|
||||
{
|
||||
"en" "Server Commands"
|
||||
}
|
||||
|
||||
"Voting Commands"
|
||||
{
|
||||
"en" "Voting Commands"
|
||||
}
|
||||
|
||||
"Reload admins"
|
||||
{
|
||||
"en" "Reload admins"
|
||||
}
|
||||
|
||||
"Ban player"
|
||||
{
|
||||
"en" "Ban player"
|
||||
}
|
||||
|
||||
"Ban reason"
|
||||
{
|
||||
"en" "Ban reason"
|
||||
}
|
||||
|
||||
"Command is in-game only"
|
||||
{
|
||||
"en" "This command can only be used in-game."
|
||||
@ -318,4 +242,11 @@
|
||||
"#format" "{1:s}"
|
||||
"en" "Slayed player '{1}'"
|
||||
}
|
||||
|
||||
/* :UNUSED: */
|
||||
"Kicked player"
|
||||
{
|
||||
"#format" "{1:s}"
|
||||
"en" "Kicked player '{1}'"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user