Either you don't have that sound or it's a problem with the path.
[CODE]music/quake/monsterkill.wav[/CODE]
would probably work instead of
[CODE]/music/quake/monsterkill.wav[/CODE]
I've been trying to follow along with this thread, but got lost towards the end. ErraticFox, what is the code that you have now for the killstreak?
I have the follow:
[CODE]local Kills = 0
hook.Add( "PlayerDeath", "player_death", function( ply, weapon, attacker )
GiveKills(ply, attacker)
end)
hook.Add( "OnNPCKilled", "on_npc_killed", function( npc, killer, weapon )
GiveKills(npc, killer)
end)
function GiveKills(ply, attacker)
if ( ply != attacker and attacker:IsPlayer()) then
attacker.Kills = attacker.Kills + 1
if ( attacker.Kills == 2 ) then
attacker:SendLua('surface.PlaySound(table.Random(ROUNDEND_WINBG))')
end
end
if( ply:IsPlayer() ) then
ply.Kills = 0 -- Resets the players killstreak if they die
end
end
function PlayerSpawn(pl)
pl.Kills = 0
[/CODE]
I'm not getting any errors, but nothing is happening either.
EDIT: I forgot to add I'm fight bots. I changed all the ply to npc and attacker to killer, and still nothing of note. I'm a nub =/
Sorry, you need to Log In to post a reply to this thread.