- 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:
David Anderson
2007-10-22 00:49:44 +00:00
parent 53156446d4
commit ef6da943d6
18 changed files with 148 additions and 112 deletions
+1
View File
@@ -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);
+1
View File
@@ -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>");
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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';
+16 -5
View File
@@ -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;
}
+1 -1
View File
@@ -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';
+1 -1
View File
@@ -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;
+17 -6
View File
@@ -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;
}
}
+4 -2
View File
@@ -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);
+20 -9
View File
@@ -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;
}
}
+1 -1
View File
@@ -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;