initial commit

This commit is contained in:
neon 2018-07-23 10:58:47 +02:00
parent 9ff9962580
commit 02794a3366
6 changed files with 163 additions and 0 deletions

View File

@ -0,0 +1,8 @@
>> Event #106 || "Challenging and rarely played" <<
/n
Maps :
- ze_mist_v1_3
- ze_undertale_g_v1_2s2
- ze_grau_s2
/n
1. Got it

View File

@ -0,0 +1,6 @@
>>UNLOZE Falldamage Fun<<
/n
We have enabled fall damage for humans on this map.
Watch out!
/n
1. Got it

View File

@ -0,0 +1,12 @@
>>UNLOZE Nemesis Fun<<
/n
Nemesis Mode is enabled on this map.
This mode has only a few but really strong zombies.
Nemesis zombies do not infect humans, but kill them instead.
They have more health, are faster and have minimal knock-back from guns.
/n
Human Tips:
You have one smoke grenade that will freeze the nemesis for 1.5 seconds.
Your knife is your best option to get rid of a nemesis zombie.
/n
1. Got it

View File

@ -0,0 +1,10 @@
Hello this is dog
/n
/n
How did those two lines get there?
/n
What is happening?
I blame Zuff.
/n
/n
1. Got it

View File

@ -0,0 +1,12 @@
>>UNLOZE Zombie Hunting Fun<<
/n
Zombie Hunting is enabled on this map.
Humans need to kill all zombies until the time runs up or zombies win.
Zombies have very low health.
If you die as a zombie you respawn back as a human.
/n
Zombie Tips:
Use !noblock to enable collision for 5 seconds.
This is useful to overcome obstacles by stacking on each other.
/n
1. Got it

View File

@ -0,0 +1,115 @@
#include <sourcemod>
#define MAXLINES 20
#pragma newdecls required
/* CONVARS */
ConVar g_cvInfoMessageFile;
/* STRINGS */
char g_sBuffer[MAXLINES][192];
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Plugin myinfo =
{
name = "InfoMessage",
author = "Neon",
description = "",
version = "1.0.0",
url = "https://steamcommunity.com/id/n3ontm"
};
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnPluginStart()
{
g_cvInfoMessageFile = CreateConVar("sm_info_message_file", "null", "", FCVAR_NONE);
HookConVarChange(g_cvInfoMessageFile, Cvar_FileChanged);
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void Cvar_FileChanged(ConVar convar, const char[] oldValue, const char[] newValue)
{
for (int i = 0; i <= (MAXLINES - 1); i++)
g_sBuffer[i] = "";
char sFile[PLATFORM_MAX_PATH];
char sLine[192];
char sFilename[192];
GetConVarString(g_cvInfoMessageFile, sFilename, sizeof(sFilename))
if (StrEqual(sFilename, "null"))
return;
BuildPath(Path_SM, sFile, sizeof(sFile), "configs/info_messages/%s.txt", sFilename);
Handle hFile = OpenFile(sFile, "r");
if(hFile != INVALID_HANDLE)
{
int iLine = 0;
while (!IsEndOfFile(hFile))
{
if (!ReadFileLine(hFile, sLine, sizeof(sLine)))
break;
TrimString(sLine);
g_sBuffer[iLine] = sLine;
iLine++;
}
CloseHandle(hFile);
}
else
LogError("[SM] File not found! (configs/info_messages/%s.txt)", sFilename);
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
int MenuHandler_NotifyPanel(Menu hMenu, MenuAction iAction, int iParam1, int iParam2)
{
switch (iAction)
{
case MenuAction_Select, MenuAction_Cancel:
delete hMenu;
}
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnClientPutInServer(int client)
{
char sFilename[192];
GetConVarString(g_cvInfoMessageFile, sFilename, sizeof(sFilename))
if (StrEqual(sFilename, "null"))
return;
Panel hNotifyPanel = new Panel(GetMenuStyleHandle(MenuStyle_Radio));
for (int i = 0; i <= (MAXLINES - 1); i++)
{
if (StrEqual(g_sBuffer[i], ""))
break;
if (StrEqual(g_sBuffer[i], "/n"))
{
hNotifyPanel.DrawItem("", ITEMDRAW_SPACER);
}
else
hNotifyPanel.DrawItem(g_sBuffer[i], ITEMDRAW_RAWLINE);
}
hNotifyPanel.SetKeys(1023);
hNotifyPanel.Send(client, MenuHandler_NotifyPanel, 0);
delete hNotifyPanel;
}