Page 1 of 1

[HL2DM] Scoreboard

Posted: Sat Dec 26, 2020 8:01 pm
by Kami
Hey guys,

this is my take on a scoreboard for Half Life 2 Deathmatch, which was requested by some players here.

Image

There also is a "rank" command which will show your current rank sorted by overall points.

Edit: Reacting to false accusations of this beeing a private plugin I decided to not take any chances and remove the link.

Re: [HL2DM] Scoreboard

Posted: Sat Dec 26, 2020 10:01 pm
by daren adler
I updated from here and downloaded it and put it on and got this.

Code: Select all

2020-12-26 15:32:37 - sp   -   EXCEPTION   
[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\scoreboard\scoreboard.py", line 470, in npc_killed
    player = Player(event['entindex_attacker'])
  File "..\addons\source-python\packages\source-python\entities\_base.py", line 132, in __call__
    obj = super().__call__(index)
  File "..\addons\source-python\packages\source-python\players\_base.py", line 96, in __init__
    PlayerMixin.__init__(self, index)

ValueError: Index '291' is not a valid player

i added other colors to this line
colors import GREEN, BLUE, RED, YELLOW
and same down the list, Would that be the error?

Re: [HL2DM] Scoreboard

Posted: Sat Dec 26, 2020 10:11 pm
by Kami
Do npcs kill other npcs on your server? Player index should only go to 64 I think. 291 should be one of the other server entities. I updated the plugin with another approach, hopefuly this will fix your error.

Re: [HL2DM] Scoreboard

Posted: Sat Dec 26, 2020 10:21 pm
by daren adler
Kami wrote:Do npcs kill other npcs on your server? Player index should only go to 64 I think. 291 should be one of the other server entities. I updated the plugin with another approach, hopefuly this will fix your error.

Ok ill check it out, ty and the npc dont hurt each other ( would be kool if they did) and the other script that uses the npc kill made it so the npc dont kill the bots. UPDATED, Yes no more errors, thank you very much. :cool: :cool:

I got it again, i dont know why either, you just fixed it but 6 hours later a error came up again, im sorry that it keeps happing, i know you fixed it, so i have no idea, but heres the error again.

Code: Select all

2020-12-27 00:51:44 - sp   -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\plugins\headshot\headshot.py", line 93, in _pre_take_damage
    _damage_weapons[victim.userid] = Player(entity.index).active_weapon.classname

AttributeError: 'NoneType' object has no attribute 'classname'


2020-12-27 00:54:45 - sp   -   EXCEPTION   
[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\scoreboard\scoreboard.py", line 421, in player_disconnect
    player_entity = Player(index_from_userid(userid))

ValueError: Conversion from "Userid" (7) to "Index" failed.


here is where the headshot scripts is viewtopic.php?f=37&t=1372&start=40 by satoon101 ยป Tue May 28, 2019 11:22 pm, also if you maybe can fix that one also. you are good at what you do, been close to a year without any trouble on the headshot deal. Stay kool my freinds and have a great new year. :cool: :cool:

Re: [HL2DM] Scoreboard

Posted: Mon Dec 28, 2020 3:03 pm
by Kami
Hey, I fixed the error in scoreboard.

Re: [HL2DM] Scoreboard

Posted: Mon Dec 28, 2020 4:37 pm
by daren adler
Kami wrote:Hey, I fixed the error in scoreboard.


ok thank you :cool: :cool:

Re: [HL2DM] Scoreboard

Posted: Tue Dec 29, 2020 5:35 am
by PEACE
Kami ,

Awesomeness job on this script bro , works great

/Peace

Re: [HL2DM] Scoreboard

Posted: Sun Feb 28, 2021 11:43 pm
by daren adler
Hello Kami. could you add on the script that the scoreboard will auto show at end of map till map change ?.

Re: [HL2DM] Scoreboard

Posted: Fri Dec 31, 2021 2:23 pm
by mrhowdy
Not to be a bother, the plugin works great! I was wondering if it would be easy to change to code a tiny bit to allow the stats to stay on screen the entire time? "stats_button = PlayerButtons.SCORE" to something permanent? I've tried but can't figure it out...