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 dynamic 131072
|
||||
char g_cDaysTitles[100][512];
|
||||
static char g_cPathsClassHuman[PLATFORM_MAX_PATH];
|
||||
static char g_cPathsClassZM[PLATFORM_MAX_PATH];
|
||||
static char g_cPathsDownload[PLATFORM_MAX_PATH];
|
||||
@ -95,6 +96,19 @@ public Plugin myinfo =
|
||||
|
||||
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();
|
||||
RetrieveWaveSettings(1);
|
||||
|
||||
@ -253,7 +267,7 @@ public Action Cmd_ChangeWave(int client, int args)
|
||||
if (l_iWave > 0)
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
@ -946,7 +960,7 @@ public Action RetrieveWaveSettings(int wave)
|
||||
delete l_hWave;
|
||||
return Plugin_Handled;
|
||||
}
|
||||
PrintToChatAll("WAVE: %i", wave);
|
||||
PrintToChatAll("Day %i: %s", wave, g_cDaysTitles[wave - 1]);
|
||||
LoadWave(wave);
|
||||
delete l_hWave;
|
||||
return Plugin_Handled;
|
||||
@ -1137,7 +1151,7 @@ public void LoadWave(int wave)
|
||||
else
|
||||
{
|
||||
g_iWave = 1;
|
||||
PrintToChatAll("Finished last Wave! Restarting...");
|
||||
PrintToChatAll("Finished last Day! Restarting...");
|
||||
CS_TerminateRound(5.0, CSRoundEnd_Draw, false);
|
||||
}
|
||||
delete kv;
|
||||
@ -1770,20 +1784,7 @@ public Action UpdateWaveCount(int client)
|
||||
else if (GetClientTeam(client) == CS_TEAM_T)
|
||||
{
|
||||
g_iZMCount--;
|
||||
//not using hudtext anymore
|
||||
/*
|
||||
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);
|
||||
PrintHintTextToAll("Day %i: %s\nRemaining Zombies: %i", g_iWave, g_cDaysTitles[g_iWave - 1], g_iZMCount);
|
||||
}
|
||||
if (g_iZMCount == 0 && g_bRoundInProgress)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user