Pending Map should no longer be shown when mapvotes are disabled.
Removed tf2 include from mapchooser. Moved sm_setnextmap to mapchooser and made it block the end of map vote. --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402427
This commit is contained in:
+5
-31
@@ -59,7 +59,6 @@ public OnPluginStart()
|
||||
|
||||
g_MapList = CreateArray(32);
|
||||
|
||||
RegAdminCmd("sm_setnextmap", Command_SetNextmap, ADMFLAG_CHANGEMAP, "sm_setnextmap <map>");
|
||||
RegAdminCmd("sm_maphistory", Command_MapHistory, ADMFLAG_CHANGEMAP, "Shows the most recent maps played");
|
||||
RegConsoleCmd("listmaps", Command_List);
|
||||
|
||||
@@ -89,31 +88,6 @@ public OnConfigsExecuted()
|
||||
}
|
||||
}
|
||||
|
||||
public Action:Command_SetNextmap(client, args)
|
||||
{
|
||||
if (args < 1)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] Usage: sm_setnextmap <map>");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
decl String:map[64];
|
||||
GetCmdArg(1, map, sizeof(map));
|
||||
|
||||
if (!IsMapValid(map))
|
||||
{
|
||||
ReplyToCommand(client, "[SM] %t", "Map was not found", map);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
ShowActivity(client, "%t", "Changed Next Map", map);
|
||||
LogMessage("\"%L\" changed nextmap to \"%s\"", client, map);
|
||||
|
||||
SetNextMap(map);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public Action:Command_List(client, args)
|
||||
{
|
||||
PrintToConsole(client, "Map Cycle:");
|
||||
@@ -214,18 +188,18 @@ FormatTimeDuration(String:buffer[], maxlen, time)
|
||||
|
||||
if (days > 0)
|
||||
{
|
||||
Format(buffer, maxlen, "%id %ih %im", days, hours, (seconds >= 30) ? minutes+1 : minutes);
|
||||
return Format(buffer, maxlen, "%id %ih %im", days, hours, (seconds >= 30) ? minutes+1 : minutes);
|
||||
}
|
||||
else if (hours > 0)
|
||||
{
|
||||
Format(buffer, maxlen, "%ih %im", hours, (seconds >= 30) ? minutes+1 : minutes);
|
||||
return Format(buffer, maxlen, "%ih %im", hours, (seconds >= 30) ? minutes+1 : minutes);
|
||||
}
|
||||
else if (minutes > 0)
|
||||
{
|
||||
Format(buffer, maxlen, "%im", (seconds >= 30) ? minutes+1 : minutes);
|
||||
return Format(buffer, maxlen, "%im", (seconds >= 30) ? minutes+1 : minutes);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(buffer, maxlen, "%is", seconds);
|
||||
return Format(buffer, maxlen, "%is", seconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user