Page 1 of 2

MostDamage v1.3

Posted: Mon Aug 13, 2012 4:17 pm
by satoon101
MostDamage displays a message about which player had the most kills each round. If multiple players have the most kills, the one that did the most damage will be shown.

There are translations involved, and only English is fully supported at this time (Russian, German, and French are partially supported). If you have translations, please issue a Pull Request on the repository:
https://github.com/satoon101/MostDamage

This plugin has been tested to work on both CS:S and CS:GO.

There is currently only one variable in the configuration, the default location for the message:

Code: Select all

// Options
//   * 0 = Off
//   * 1 = HudHint
//   * 2 = CenterMsg
//   * 3 = HudHint & CenterMsg
//   * 4 = KeyHint
//   * 5 = HudHint & KeyHint
//   * 6 = CenterMsg & KeyHint
//   * 7 = HudHint, CenterMsg & KeyHint
// Default Value: 1
// Default placement of the most damage message
   md_default_location "1"


The default location is used if the player does not have one set for themselves on the server. For more information on Player Settings:

http://forums.sourcepython.com/showthread.php?590&viewfull=1#post3066 - this link will be updated once this information has been added to the wiki

Posted: Fri Aug 17, 2012 11:54 am
by Kami
I get this error when I try to load the addon:

Image

Posted: Fri Aug 17, 2012 1:20 pm
by Tuck
Kami you need the latest revision of Source Python (Compile the latest source code your self)

Posted: Fri Aug 17, 2012 4:55 pm
by your-name-here
Tuck wrote:Kami you need the latest revision of Source Python (Compile the latest source code your self)


Just as an FYI: We do hope to have another build posted up on googlecode today.

Posted: Fri Aug 17, 2012 5:41 pm
by Tuck
your-name-here wrote:Just as an FYI: We do hope to have another build posted up on googlecode today.


Happy to hear, would it be a build or just commited?

Posted: Fri Aug 17, 2012 6:21 pm
by your-name-here
It would be a full build. I hate making people who aren't C++ programmers try to build stuff :P
Plus a build would enable people to just download and get started immediately with SP.

Posted: Fri Aug 17, 2012 10:27 pm
by tnarocks
im not even sure mine is working cause i never see that image on my screen

Posted: Fri Aug 17, 2012 11:12 pm
by your-name-here
tnarocks wrote:im not even sure mine is working cause i never see that image on my screen

Unfortunately, we've yet to post a build that contains the functionality needed for this addon. It IS checked into source control, but you need to build it yourself. I am still working on getting a build posted but the Linux compile is giving me trouble.

Wait until my news post about the new build or build SP yourself :P

Posted: Fri Aug 17, 2012 11:15 pm
by tnarocks
i can wait im in no hurry. and thanks for the fast reply ynh

Posted: Fri Aug 17, 2012 11:17 pm
by your-name-here
No worries good sir :)

Posted: Sat Aug 18, 2012 12:35 am
by satoon101
One thing to note is that if you get an achievement at the end of a round, you will not see the message, as the achievement will be sent over top of it. I wanted to use a different location for the message, but unfortunately, KeyHintText is the exact same as HintText right now in CS:GO...

Also, this script requires rounds to end. You will never see the message during DeathMatch play.

Satoon

Posted: Thu Aug 23, 2012 9:00 am
by stonedegg
One question to scripting:
What does the @Event stand for before you define an event?

Posted: Thu Aug 23, 2012 1:47 pm
by ashbash1987
@Event, like anything else on a line starting with @ in Python are Decorators; they basically provide extra information/implementation details about a method/class/etc. If you come from a language like C#, think of them like Attributes.

Basically in this case @Event decorators are used to flag methods as event methods (e.g. player_death, round_start, etc.). In EventScripts, this wasn't needed as it would manually look through the entire module and get the methods that have the same names as events and then hook them up (slow and could accidentally hook-up event methods you don't want to with the same name as an in-game event). Using decorators instead, less work needs to be done in SP, as only those methods which are hooked-up with @Event will actually get hooked. Also, it's quite obvious to the reader of the code that the method is specifically an event block (very much like in the original EventScripts Shell language which used the block keyword event to denote event blocks).

Posted: Sat Aug 25, 2012 9:41 am
by stonedegg
Thanks for this nice explanation!

Posted: Sat Feb 02, 2013 3:47 am
by satoon101
Finally updated this script to utilize the newest version of SP. It also includes a Translation file. If you have other translations (currently only English is included), please share them so I can add them to the download.

Satoon

Nice! :)

Posted: Sat Feb 02, 2013 4:20 am
by L'In20Cible

Code: Select all

[Most Damage]
en = "Top Damage: $name\nKills: $kills\nDamage: $damage"
fr = "Top Damage: $name\nEnnemis tu?s: $kills\nD?g?ts inflig?s: $damage"

Posted: Sat Feb 02, 2013 4:29 am
by satoon101
Seems like the translation did not copy/paste properly. Either that or it is an issue with the forums. Maybe just attach an updated .ini file for the time being.

Thank you, though,
Satoon

Posted: Sat Feb 02, 2013 12:06 pm
by L'In20Cible
Oh, yeah. Totally forgot about the characters issue. It was working fine prior the site being down.

http://pastebin.com/jKYiKHEC

L'In20Cible

Posted: Sat Feb 02, 2013 12:17 pm
by Ayuto

Posted: Sat Feb 02, 2013 4:10 pm
by satoon101
Thank you both. I will add those when I get home later today.

*Edit: added, thanks again.

Satoon