Added amb1826 - 'nextmap' command now attempts to obey 'sm_trigger_show' if available.
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402401
This commit is contained in:
parent
1a156deca5
commit
e1882f97a1
@ -36,6 +36,7 @@
|
|||||||
#include <sourcemod>
|
#include <sourcemod>
|
||||||
#include "include/nextmap.inc"
|
#include "include/nextmap.inc"
|
||||||
|
|
||||||
|
new Handle:g_Cvar_TriggerShow = INVALID_HANDLE;
|
||||||
|
|
||||||
public Plugin:myinfo =
|
public Plugin:myinfo =
|
||||||
{
|
{
|
||||||
@ -85,6 +86,8 @@ public OnConfigsExecuted()
|
|||||||
{
|
{
|
||||||
FindAndSetNextMap();
|
FindAndSetNextMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_Cvar_TriggerShow = FindConVar("sm_trigger_show");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action:Command_Say(client, args)
|
public Action:Command_Say(client, args)
|
||||||
@ -109,8 +112,15 @@ public Action:Command_Say(client, args)
|
|||||||
{
|
{
|
||||||
decl String:map[32];
|
decl String:map[32];
|
||||||
GetNextMap(map, sizeof(map));
|
GetNextMap(map, sizeof(map));
|
||||||
|
|
||||||
PrintToChat(client, "[SM] %t", "Next Map", map);
|
if(g_Cvar_TriggerShow != INVALID_HANDLE && GetConVarInt(g_Cvar_TriggerShow))
|
||||||
|
{
|
||||||
|
PrintToChatAll("[SM] %t", "Next Map", map);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PrintToChat(client, "[SM] %t", "Next Map", map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
@ -162,7 +172,14 @@ public Action:Command_Nextmap(client, args)
|
|||||||
|
|
||||||
GetNextMap(map, sizeof(map));
|
GetNextMap(map, sizeof(map));
|
||||||
|
|
||||||
ReplyToCommand(client, "[SM] %t", "Next Map", map);
|
if(g_Cvar_TriggerShow != INVALID_HANDLE && GetConVarInt(g_Cvar_TriggerShow))
|
||||||
|
{
|
||||||
|
PrintToChatAll("[SM] %t", "Next Map", map);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ReplyToCommand(client, "[SM] %t", "Next Map", map);
|
||||||
|
}
|
||||||
|
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user