• players kills
    2 replies, posted
How can I see if a player has gotten X amount of kills in 3 seconds? My buddy told me to do something like this [lua]local times = {} times[1] = CurTime() [/lua] and if it returns 5, then it's 5 second or something like that. I get what he's saying but I'm not exactly sure how to do what he is saying. Can anyone help?
taken from hackvshack: [lua] local kills = attacker:IsPlayer() && attacker:Frags() || false timer.Simple( 1, function() if( kills && attacker ) then if( attacker:Frags() - kills >= 3 ) then PrintMessage( HUD_PRINTCENTER, string.upper( attacker:Nick() ) .. " MONSTER KILL" ) umsg.Start("hvhsound") umsg.String("hvh/monsterkill.mp3") umsg.End() end end end ) [/lua]
<3
Sorry, you need to Log In to post a reply to this thread.