diff --git a/FakeMapname/scripting/FakeMapname.sp b/FakeMapname/scripting/FakeMapname.sp new file mode 100644 index 00000000..a7853b5f --- /dev/null +++ b/FakeMapname/scripting/FakeMapname.sp @@ -0,0 +1,65 @@ +#include +#include + +#pragma semicolon 1 +#pragma newdecls required + +char g_sMapname[64]; + +public Plugin myinfo = +{ + name = "FakeMapname", + author = "Neon", + description = "", + version = "1.0", + url = "https://steamcommunity.com/id/n3ontm" +}; + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnGameFrame() +{ + SteamWorks_SetMapName(g_sMapname); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnPluginStart() +{ + RegAdminCmd("sm_fakemap", Command_FakeMap, ADMFLAG_ROOT, ""); + RegAdminCmd("sm_resetfakemap", Command_ResetFakeMap, ADMFLAG_ROOT, ""); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnMapStart() +{ + GetCurrentMap(g_sMapname, sizeof(g_sMapname)); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action Command_FakeMap(int client, int argc) +{ + GetCmdArgString(g_sMapname, sizeof(g_sMapname)); + ReplyToCommand(client, "[SM] Changed Mapname to \"%s\".", g_sMapname); + PrintToChatAll("[SM] %N changed Mapname to \"%s\".", client, g_sMapname); + LogAction(client, -1, "\"%L\" changed Mapname to \"%s\".", client, g_sMapname); + return Plugin_Handled; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action Command_ResetFakeMap(int client, int argc) +{ + GetCurrentMap(g_sMapname, sizeof(g_sMapname)); + ReplyToCommand(client, "[SM] Mapname got reset."); + PrintToChatAll("[SM] %N reset Mapname to \"%s\".", client, g_sMapname); + LogAction(client, -1, "\"%L\" reset Mapname to \"%s\".", client, g_sMapname); + return Plugin_Handled; +} \ No newline at end of file diff --git a/ForceInputs/scripting/ForceInputs.sp b/ForceInputs/scripting/ForceInputs.sp index 1b71afd7..de073c53 100644 --- a/ForceInputs/scripting/ForceInputs.sp +++ b/ForceInputs/scripting/ForceInputs.sp @@ -134,7 +134,7 @@ public Action Command_ForceInput(int client, int args) AcceptEntityInput(entity, sArguments[1], client, client); ReplyToCommand(client, "[SM] Input successful."); - + char sClassname[64]; char sTargetname[64]; GetEntPropString(entity, Prop_Data, "m_iClassname", sClassname, sizeof(sClassname)); @@ -157,7 +157,7 @@ public Action Command_ForceInput(int client, int args) AcceptEntityInput(entity, sArguments[1], client, client); ReplyToCommand(client, "[SM] Input successful."); - + char sClassname[64]; char sTargetname[64]; GetEntPropString(entity, Prop_Data, "m_iClassname", sClassname, sizeof(sClassname)); diff --git a/mapchooser_extended/scripting/nominations_extended.sp b/mapchooser_extended/scripting/nominations_extended.sp index 6f9c40e3..7d09db00 100644 --- a/mapchooser_extended/scripting/nominations_extended.sp +++ b/mapchooser_extended/scripting/nominations_extended.sp @@ -566,14 +566,30 @@ public Action Command_NominateList(int client, int args) GetNominatedMapList(MapList); if(!GetArraySize(MapList)) { - CPrintToChat(client, "[NE] No maps have been nominated."); + ReplyToCommand(client, "[NE] No maps have been nominated."); + delete MapList; + return Plugin_Handled; + } + + static char map[PLATFORM_MAX_PATH]; + + if (client == 0) + { + char aBuf[2048]; + StrCat(aBuf, sizeof(aBuf), "[NE] Nominated Maps:"); + for(int i = 0; i < GetArraySize(MapList); i++) + { + StrCat(aBuf, sizeof(aBuf), "\n"); + GetArrayString(MapList, i, map, sizeof(map)); + StrCat(aBuf, sizeof(aBuf), map); + } + ReplyToCommand(client, aBuf); delete MapList; return Plugin_Handled; } Handle NominateListMenu = CreateMenu(Handler_NominateListMenu, MENU_ACTIONS_DEFAULT|MenuAction_DisplayItem); - static char map[PLATFORM_MAX_PATH]; for(int i = 0; i < GetArraySize(MapList); i++) { GetArrayString(MapList, i, map, sizeof(map));