fixed amb1282 - elev1.wav is cstrike only

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401797
This commit is contained in:
David Anderson 2007-12-14 05:54:36 +00:00
parent 99ebeb1645
commit af2142d70b
2 changed files with 18 additions and 2 deletions

View File

@ -50,6 +50,7 @@ public Plugin:myinfo =
new Handle:hTopMenu = INVALID_HANDLE;
new g_SlapDamage[MAXPLAYERS+1];
new bool:g_cstrike = false;
#include "basefuncommands/slay.sp"
#include "basefuncommands/burn.sp"
@ -73,6 +74,14 @@ public OnPluginStart()
{
OnAdminMenuReady(topmenu);
}
decl String:folder[64];
GetGameFolderName(folder, sizeof(folder));
if (strcmp(folder, "cstrike") == 0)
{
g_cstrike = true;
}
}
public OnMapStart()

View File

@ -50,7 +50,10 @@ SetupBeacon()
g_BeaconRoundEndHooked = true;
}
if (g_cstrike)
{
PrecacheSound("ambient/tones/elev1.wav", true);
}
g_BeamSprite = PrecacheModel("materials/sprites/laser.vmt");
g_HaloSprite = PrecacheModel("materials/sprites/halo01.vmt");
@ -132,8 +135,12 @@ public Action:Timer_Beacon(Handle:timer, any:client)
CreateTimer(0.2, Timer_Beacon, client);
GetClientEyePosition(client, vec);
if (g_cstrike)
{
EmitAmbientSound("ambient/tones/elev1.wav", vec, client, SNDLEVEL_RAIDSIREN);
}
}
return Plugin_Handled;
}