Kills per round
Hello :3
I want to make a plugin that prints a chat message at the end of a round with the total number of kills a player ever made on a server. My first attempt was to use get_user_stats, but if I use it at the end of a round I am not able to get the current number of kills. So I thought I could remember this number and add to this number every round the number of kills a player made. I tried it with get_user_frags, but this also includes teamkills, defuse a bomb, etc. I only want to know how many enemies a player killed in 1 round. How can I get this number? Or is there any other solution how I can get the total number of kills a player ever made on a server at the end of every round? |
Re: Kills per round
Create a variable like playerKills[ 33 ] and hook the death event, increase the counter and print it when you need.
|
Re: Kills per round
Here you go (not tested)
PHP Code:
|
Re: Kills per round
PHP Code:
PHP Code:
|
Re: Kills per round
arrayset is a loop too, but runs on a faster layer, cause it's from a module.
|
Re: Kills per round
Quote:
|
Re: Kills per round
You way is much more slower and is not a good way. get_players exists for a reason, it also let you specify flags to filter the search.
|
Re: Kills per round
Quote:
|
Re: Kills per round
Quote:
|
Re: Kills per round
Quote:
|
| All times are GMT -4. The time now is 17:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.