Quote:
Originally Posted by login_xcvop
if i wanna add double kill ? and reset killCount per 3seconds, set task ?
PHP Code:
if(2 <= killCount[killerIndx]) { // double }
if(3 <= 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.