[Get player with most kills]
Hello everyone,
I got question.. If a player kills someone it do: Kills[iAttacker]++; Then on round end, I need to know who got most kill of each team. How I can get that? :) Thank you! |
Re: [Get player with most kills]
you can look any part from my plugin.
|
Re: [Get player with most kills]
PHP Code:
|
Re: [Get player with most kills]
Quote:
PHP Code:
|
Re: [Get player with most kills]
What about RequiredKills ?
|
Re: [Get player with most kills]
With both of those versions he'd have to hardcode a max kill count or something, if he makes it like 20-30 and someone gets over that, then there will be two that are >= that number and there will be problems.
EDIT: Look at BF2 Mod, it has a map change type of winner thing you could use, but just use it on roundend and not map change. |
Re: [Get player with most kills]
Quote:
|
Re: [Get player with most kills]
Quote:
|
Re: [Get player with most kills]
Use a variable to store the current highest kill number and current highest player id. Check each players kills against it and if that player had a higher kill number update that variable with his kill# and id. After the loop you will be left with highest kill number and the players id.
Something like this, with the addition of team checks, should work for you. untested. PHP Code:
|
Re: [Get player with most kills]
or this may help u too:
http://forums.alliedmods.net/showthread.php?t=109842 post #4: http://forums.alliedmods.net/showpos...94&postcount=4 :wink: |
| All times are GMT -4. The time now is 21:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.