Raised This Month: $ Target: $400
 0% 

what best method detect double kill ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 11-23-2013 , 14:20   Re: what best method detect double kill ?
Reply With Quote #2

PHP Code:
new g_hasKilledTimer[33]

ham_killed(...)
{
   if(
g_hasKilledTimer[attacker])
   {
      
g_hasKilledTimer[attacker] = false

      
// *********************
      // attacker did a double kill
      // add actions here
      // *********************
   
}
   else
   {
      
g_hasKilledTimer[attacker] = true
      set_task
(5.0"resetTimer"attacker)
   }
}

public 
resetTimer(id)
{
     
g_hasKilledTimer[id] = false

Like this you could detect a doublekill in 5.0 seconds. Make sure you validate the attacker and the victim in ham_killed...
mottzi is offline
Send a message via MSN to mottzi
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode