Kill 6 players in 15 seconds
How to catch this?
|
Re: Kill 6 players in 15 seconds
It must be something like that :
PHP Code:
|
Re: Kill 6 players in 15 seconds
Thanks, I'll try it soon.
|
Re: Kill 6 players in 15 seconds
I edited code, forgot to check if iAttacker was player ._.
Gonna be ok now. |
Re: Kill 6 players in 15 seconds
I didn't check the whole code, but in the player check, MAX_PLAYERS should be replaced with a value (cached) of get_maxplayers().
|
Re: Kill 6 players in 15 seconds
He has to change the define, that's all
|
Re: Kill 6 players in 15 seconds
What if this happens:
Player killed someone, therefore the timer started. After 10 seconds, the player kills other 4 players. The timer has ended, while the player had only 5 kills. A few seconds later, the player kills two more people. Because the first timer has already ended, the 4 kills won't be counted. Even though the 4 kills + 2 kills would be for example in 10 seconds, the plugin won't catch this event. It's not that easy to describe the event, so I hope you understood what I just wrote. This is also mainly the reason I started the thread. |
Re: Kill 6 players in 15 seconds
It's what you asked for.
Quote:
If that's not what you are looking for, tell me exactly what you want :d. |
Re: Kill 6 players in 15 seconds
Your way basically "cycles" the timer.
When it ends, it starts a new one after the player kills someone. When the player kills 3 people 5 seconds before the timer ends and kills other 3 people right after the timer ends, he would still kill 6 people under 15 seconds but your method wouldn't recognize it. Edit: This would probably work, but I don't like the array shifting part. Any better ideas? Code:
What this code does is cache the last 6 kills of a player, then check if the time between the first and 6th kill is 15 seconds or less. |
Re: Kill 6 players in 15 seconds
Quote:
Oh ok i understood (i think) what you want, here you go : PHP Code:
|
| All times are GMT -4. The time now is 21:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.