Raised This Month: $ Target: $400
 0% 

what best method detect triple kill per time?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CyberStars
Senior Member
Join Date: May 2013
Old 01-29-2014 , 03:39   Re: what best method detect triple kill per time?
Reply With Quote #7

Quote:
Originally Posted by login_xcvop View Post
if i wanna add double kill ? and reset killCount per 3seconds, set task ?
PHP Code:
        if(<= killCount[killerIndx]) 
        {
                          
// double
        
}

        if(
<= killCount[killerIndx]) 
        {
                          
// triple
        

If you want to calculate number of kills within 3 seconds, you should also change
Code:
if(3 >= currTime - times[killerIndx]) {
       killCount[killerIndx]++;
} else {
       killCount[killerIndx] = 1;
       times[killerIndx] = currTime;
}
For other part of code, yes, you're right.

Last edited by CyberStars; 01-29-2014 at 03:41.
CyberStars is offline
 



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 10:04.


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