Code |
function GM:RoundEnd( )
local LoseSound = { "vo/npc/Barney/ba_no01.wav", "vo/npc/Barney/ba_no02.wav", "vo/npc/male01/no01.wav", "vo/npc/male01/no02.wav" }
local WinSound = { "vo/npc/female01/yeah02.wav", "vo/npc/male01/yeah02.wav" }
for k,v in pairs(player.GetAll()) do
if !v:Alive() and !v:Team() == TEAM_SPECTATOR then
v:SendLua( "surface.PlaySound( \"" .. table.Random(LoseSound) .. "\" )" )
v:ChatPrint("You failed, the other team has won the round.")
elseif v:Alive and !v:Team() == TEAM_SPECTATOR then
v:SendLua( "surface.PlaySound( \"" .. table.Random(WinSound) .. "\" )" )
v:ChatPrint("You won, the other team has lost the round.")
end
end
end
|