Initial check in.

This commit is contained in:
mbalex
2008-10-04 22:59:11 +02:00
commit 01f65c9ee5
76 changed files with 19320 additions and 0 deletions

47
src/zr/overlays.inc Normal file
View File

@ -0,0 +1,47 @@
/**
* ====================
* Zombie:Reloaded
* File: overlays.inc
* Author: Greyscale
* ====================
*/
ShowOverlays(Float:time, ZTeam:winner)
{
new bool:overlays = GetConVarBool(gCvars[CVAR_OVERLAYS]);
if (overlays)
{
decl String:overlay[64];
if (winner == Human)
{
GetConVarString(gCvars[CVAR_OVERLAYS_HUMAN], overlay, sizeof(overlay));
}
else if (winner == Zombie)
{
GetConVarString(gCvars[CVAR_OVERLAYS_ZOMBIE], overlay, sizeof(overlay));
}
new maxplayers = GetMaxClients();
for (new x = 1; x <= maxplayers; x++)
{
if (IsClientInGame(x))
{
DisplayClientOverlay(x, overlay);
}
}
CreateTimer(time, KillOverlays);
}
}
public Action:KillOverlays(Handle:timer)
{
new maxplayers = GetMaxClients();
for (new x = 1; x <= maxplayers; x++)
{
if (IsClientInGame(x))
{
ClientCommand(x, "r_screenoverlay \"\"");
}
}
}