added a file with day names that are displayed at relevant times
This commit is contained in:
parent
1f1d2cb111
commit
552a81ac14
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#pragma newdecls required
|
#pragma newdecls required
|
||||||
//#pragma dynamic 131072
|
//#pragma dynamic 131072
|
||||||
|
char g_cDaysTitles[100][512];
|
||||||
static char g_cPathsClassHuman[PLATFORM_MAX_PATH];
|
static char g_cPathsClassHuman[PLATFORM_MAX_PATH];
|
||||||
static char g_cPathsClassZM[PLATFORM_MAX_PATH];
|
static char g_cPathsClassZM[PLATFORM_MAX_PATH];
|
||||||
static char g_cPathsDownload[PLATFORM_MAX_PATH];
|
static char g_cPathsDownload[PLATFORM_MAX_PATH];
|
||||||
@ -95,6 +96,19 @@ public Plugin myinfo =
|
|||||||
|
|
||||||
public void OnPluginStart()
|
public void OnPluginStart()
|
||||||
{
|
{
|
||||||
|
char localPath[256];
|
||||||
|
BuildPath(Path_SM, localPath, sizeof(localPath), "configs/unloze_zr/daystitle.txt");
|
||||||
|
Handle fileHandle = OpenFile(localPath, "r");
|
||||||
|
char lineBuffer[512];
|
||||||
|
int count = 0;
|
||||||
|
while( !IsEndOfFile( fileHandle ) && ReadFileLine( fileHandle, lineBuffer, sizeof( lineBuffer ) ) )
|
||||||
|
{
|
||||||
|
TrimString( lineBuffer );
|
||||||
|
Format(g_cDaysTitles[count], sizeof(g_cDaysTitles[]), lineBuffer);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
CloseHandle( fileHandle );
|
||||||
|
|
||||||
OnMapStart();
|
OnMapStart();
|
||||||
RetrieveWaveSettings(1);
|
RetrieveWaveSettings(1);
|
||||||
|
|
||||||
@ -253,7 +267,7 @@ public Action Cmd_ChangeWave(int client, int args)
|
|||||||
if (l_iWave > 0)
|
if (l_iWave > 0)
|
||||||
{
|
{
|
||||||
g_iWave = l_iWave;
|
g_iWave = l_iWave;
|
||||||
PrintToChatAll("Admin %N Changing wave to: %i", client, g_iWave);
|
PrintToChatAll("Admin %N Changing to Day %i: %s", client, g_iWave, g_cDaysTitles[g_iWave - 1]);
|
||||||
CS_TerminateRound(4.0, CSRoundEnd_Draw, false);
|
CS_TerminateRound(4.0, CSRoundEnd_Draw, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -946,7 +960,7 @@ public Action RetrieveWaveSettings(int wave)
|
|||||||
delete l_hWave;
|
delete l_hWave;
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
PrintToChatAll("WAVE: %i", wave);
|
PrintToChatAll("Day %i: %s", wave, g_cDaysTitles[wave - 1]);
|
||||||
LoadWave(wave);
|
LoadWave(wave);
|
||||||
delete l_hWave;
|
delete l_hWave;
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
@ -1137,7 +1151,7 @@ public void LoadWave(int wave)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_iWave = 1;
|
g_iWave = 1;
|
||||||
PrintToChatAll("Finished last Wave! Restarting...");
|
PrintToChatAll("Finished last Day! Restarting...");
|
||||||
CS_TerminateRound(5.0, CSRoundEnd_Draw, false);
|
CS_TerminateRound(5.0, CSRoundEnd_Draw, false);
|
||||||
}
|
}
|
||||||
delete kv;
|
delete kv;
|
||||||
@ -1770,20 +1784,7 @@ public Action UpdateWaveCount(int client)
|
|||||||
else if (GetClientTeam(client) == CS_TEAM_T)
|
else if (GetClientTeam(client) == CS_TEAM_T)
|
||||||
{
|
{
|
||||||
g_iZMCount--;
|
g_iZMCount--;
|
||||||
//not using hudtext anymore
|
PrintHintTextToAll("Day %i: %s\nRemaining Zombies: %i", g_iWave, g_cDaysTitles[g_iWave - 1], g_iZMCount);
|
||||||
/*
|
|
||||||
char l_cCount[g_dIndexes];
|
|
||||||
SetHudTextParams(-0.4, 0.8, 10.0, 255, 0, 255, 255, 1, 0.1, 0.1, 0.1);
|
|
||||||
for (int i = 1; i <= MaxClients; i++)
|
|
||||||
{
|
|
||||||
if (IsValidClient(i) && !IsFakeClient(i))
|
|
||||||
{
|
|
||||||
Format(l_cCount, sizeof(l_cCount), "Remaining Zombies: %i", g_iZMCount);
|
|
||||||
ShowHudText(i, 3, l_cCount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
PrintHintTextToAll("Remaining Zombies: %i", g_iZMCount);
|
|
||||||
}
|
}
|
||||||
if (g_iZMCount == 0 && g_bRoundInProgress)
|
if (g_iZMCount == 0 && g_bRoundInProgress)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user