Isn't the killer/victim same
How to check isn't the victim same for 2nd or even 3rd time ?
Like If I've killed Player5 3times a row, I want message to be displayed, You have killed Player5 3 times in a row :) |
Re: Isn't the killer/victim same
PHP Code:
|
Re: Isn't the killer/victim same
Killing the same player without killing anyone else in between or killing a player more than once without you beeing killed by him ?
Example with the 2nd, like the when you dominate someone in TF2: Code:
new g_iKilled[33][33]EDIT: pff, I forgot this forum doesn't notify me if someone posted while I was writing xD |
Re: Isn't the killer/victim same
Make 2d array and count each time one id killed another
Say id 3 kills id 9 new iKills[ 33 ][ 33 ]; iKills[ 9 ][ 3 ]++; Edit: lols @ 3 posts at the same time |
Re: Isn't the killer/victim same
Quote:
|
Re: Isn't the killer/victim same
Yes we all suggested the same method, so you have your answer :P
But I'm still curious about: Quote:
|
Re: Isn't the killer/victim same
Killing the same player without killing someone else in between ;p
also if I'm returning in this: PHP Code:
like: PHP Code:
|
Re: Isn't the killer/victim same
Edit: Eliminated g_iLastKilled[ 33 ] array, now using first cell of g_iKills[ iKiller ][] (since it does not get used anyway) to store the last person iKiller killed.
PHP Code:
|
Re: Isn't the killer/victim same
In that case, you need adjustments to the codes provided by me or hlev:
Code:
new g_iTarget[33]Quote:
|
Re: Isn't the killer/victim same
Isn't the bugsy's code good ? It looks more simply :)
|
| All times are GMT -4. The time now is 19:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.