Added sound effects module, moved all moaning, groaning, and death sounds to zombie sounds sub-module, and made a basic sound API.

This commit is contained in:
Greyscale
2009-04-16 22:21:32 +02:00
parent 39ff709d7f
commit ee9d3a9f39
12 changed files with 460 additions and 156 deletions

View File

@ -70,7 +70,6 @@ new bool:zombieSpawned;
new bool:motherZombie[MAXPLAYERS + 1];
new bool:gZombie[MAXPLAYERS + 1];
new bool:gBlockMotherInfect[MAXPLAYERS + 1];
new bool:gKilledByWorld[MAXPLAYERS + 1];
new Float:spawnLoc[MAXPLAYERS + 1][3];
new Float:bufferLoc[MAXPLAYERS + 1][3];
@ -88,9 +87,8 @@ new Handle:tInfect = INVALID_HANDLE;
new Handle:pList = INVALID_HANDLE;
#define MAXTIMERS 2
#define MAXTIMERS 1
#define TMOAN 0
#define TTELE 1
new Handle:tHandles[MAXPLAYERS + 1][MAXTIMERS];
@ -228,6 +226,7 @@ bool:IsPlayerInList(client)
*
* @param client The client index.
* @param console True to include console (index 0), false if not.
* @return True if client is valid, false otherwise.
*/
bool:ZRIsValidClient(client, bool:console = false)
{
@ -241,6 +240,32 @@ bool:ZRIsValidClient(client, bool:console = false)
return console ? (client >= 0) : (client > 0);
}
/**
* Check if a client index is on a team.
*
* @param client The client index.
* @param team Team to check if player is on, -1 to check both.
* @return True if client is on a team, false otherwise.
*/
bool:ZRIsClientOnTeam(client, team = -1)
{
// If index is invalid, then stop.
if (!ZRIsValidClient(client))
{
return false;
}
// Get client team.
new clientteam = GetClientTeam(client);
if (team == -1)
{
return (clientteam == CS_TEAM_T || clientteam == CS_TEAM_CT);
}
return (clientteam == team);
}
/**
* Returns whether a player is a generic admin or not.
*