Page 1 of 1

CircleDamageIndicator

Posted: Wed Apr 14, 2021 2:52 am
by qPexLegendary
Hello everyone. It's my first plugin on SP. It show damage done to other player in around crosshair.

GitHub: https://github.com/qPexLegendary/CircleDamageIndicator

Screenshot:
Image

Re: CircleDamageIndicator

Posted: Wed Apr 14, 2021 5:08 am
by cssbestrpg
Hello, congratulations for your first plugin on SP and welcome to SP Forums

Re: CircleDamageIndicator

Posted: Wed Apr 14, 2021 5:47 am
by Ayuto
Very cool stuff!

Just one note: the PluginInfo class isn't meant to be created by the plugin. It's being created by SP, so it's also possible to retrieve information about unloaded plugins. To tell SP which information the instance should contain, you can create an info.ini file:
http://wiki.sourcepython.com/developing ... plugininfo

Re: CircleDamageIndicator

Posted: Wed Apr 14, 2021 6:25 am
by qPexLegendary
Ayuto wrote:Very cool stuff!

Just one note: the PluginInfo class isn't meant to be created by the plugin. It's being created by SP, so it's also possible to retrieve information about unloaded plugins. To tell SP which information the instance should contain, you can create an info.ini file:
http://wiki.sourcepython.com/developing ... plugininfo

Thanks for the advice. I just barely looked at the documentation(Im lazy) and did it at random, but used basis of other plugin :grin:

Re: CircleDamageIndicator

Posted: Wed Apr 14, 2021 8:18 am
by cssbestrpg
I have the tested plugin in css. I noticed it gives the errors when did shoot enemy:

Code: Select all

[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\packages\source-python\events\listener.py", line 92, in fire_game_event
    callback(game_event)
  File "..\addons\source-python\plugins\circle_damage_indicator\circle_damage_indicator.py", line 54, in on_damage
    color1=Color(*color.get_as_tuple),

OverflowError: can't convert negative value to unsigned int

Re: CircleDamageIndicator

Posted: Wed Apr 14, 2021 11:24 am
by qPexLegendary
cssbestrpg wrote:I have the tested plugin in css. I noticed it gives the errors when did shoot enemy:

Code: Select all

[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\packages\source-python\events\listener.py", line 92, in fire_game_event
    callback(game_event)
  File "..\addons\source-python\plugins\circle_damage_indicator\circle_damage_indicator.py", line 54, in on_damage
    color1=Color(*color.get_as_tuple),

OverflowError: can't convert negative value to unsigned int

I have fixed this now. Thank you