[HL2:DM] Headshot Help

A place for requesting new Source.Python plugins to be made for your server.

Please request only one plugin per thread.
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Mon May 27, 2019 3:20 am

That is most recent.
User avatar
Painkiller
Senior Member
Posts: 726
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: [HL2:DM] Headshot Help

Postby Painkiller » Mon May 27, 2019 6:56 pm

Hello, I do not get this error.

Test this one again.
Good luck
Attachments
headshot.rar
(1.95 KiB) Downloaded 891 times
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Mon May 27, 2019 11:44 pm

OK will do, I will let you kmow how it goes. ty
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Tue May 28, 2019 12:04 am

Syntax: Select all

2019-05-27 19:00:30 - sp	-	MESSAGE	[SP] Loading plugin 'most_damage'...
2019-05-27 19:00:30 - sp - MESSAGE [SP] Successfully loaded plugin 'most_damage'.
2019-05-27 19:00:30 - sp - MESSAGE [SP] Loading plugin 'explosive'...
2019-05-27 19:00:30 - sp - MESSAGE [SP] Successfully loaded plugin 'explosive'.
2019-05-27 19:00:30 - sp - MESSAGE [SP] Loading plugin 'killmessage'...
2019-05-27 19:00:30 - sp - MESSAGE [SP] Successfully loaded plugin 'killmessage'.
2019-05-27 19:00:30 - sp - MESSAGE [SP] Loading plugin 'headshot'...
2019-05-27 19:00:30 - sp - EXCEPTION
[SP] Caught an Exception:
Traceback (most recent call last):
File "..\addons\source-python\packages\source-python\plugins\command.py", line 162, in load_plugin
plugin = self.manager.load(plugin_name)
File "..\addons\source-python\packages\source-python\plugins\manager.py", line 194, in load
plugin._load()
File "..\addons\source-python\packages\source-python\plugins\instance.py", line 74, in _load
self.module = import_module(self.import_name)
File "..\addons\source-python\plugins\headshot\headshot.py", line 19, in <module>
from supermod import functions

ModuleNotFoundError: No module named 'supermod'


2019-05-27 19:00:30 - sp - MESSAGE [SP] Plugin 'headshot' was unable to be loaded.
2019-05-27 19:00:30 - sp - MESSAGE [SP] Loading plugin 'noblock'...
2019-05-27 19:00:30 - sp - MESSAGE [SP] Successfully loaded plugin 'noblock'.
2019-05-27 19:00:30 - sp - MESSAGE [SP] Loading plugin 'blood'...
2019-05-27 19:00:30 - sp - MESSAGE [SP] Successfully loaded plugin 'blood'.
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Tue May 28, 2019 12:05 am

Nope sorry. :frown: It wont let the server start with it,,i mean it starts but freezes and wont let me on. I tryed and removed 'supermod', game started,but the headshot (headless model) didnot show or blood splat, just the headshot sound. So i put the 'supermod' back on and used the older one,,ill set this aside till you tell me what to do,,thank you.
User avatar
Painkiller
Senior Member
Posts: 726
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: [HL2:DM] Headshot Help

Postby Painkiller » Tue May 28, 2019 8:07 am

Comment out the line supermod with a #?

Specify paths correctly to the materials models etc.
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Tue May 28, 2019 2:47 pm

ok will try..ty
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Tue May 28, 2019 3:53 pm

Code: Select all

2019-05-28 10:50:11 - sp   -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\plugins\headshot\headshot.py", line 103, in _pre_take_damage
    _damage_weapons[victim.userid] = Player(info.attacker).active_weapon.weapon_name
  File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
    super().__init__(index)
  File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
    super().__init__(index)

ValueError: Index '365' is not a valid player.


2019-05-28 10:50:11 - sp   -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\plugins\blood\blood.py", line 22, in _pre_take_damage
    weapon_index = info.weapon

ValueError: Attacker is not a player.


2019-05-28 10:50:11 - sp   -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\plugins\explosive\explosive.py", line 21, in _pre_take_damage
    weapon_index = info.weapon

ValueError: Attacker is not a player.


2019-05-28 10:50:11 - sp   -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\plugins\headshot\headshot.py", line 103, in _pre_take_damage
    _damage_weapons[victim.userid] = Player(info.attacker).active_weapon.weapon_name
  File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
    super().__init__(index)
  File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
    super().__init__(index)

ValueError: Index '365' is not a valid player.


2019-05-28 10:50:11 - sp   -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\plugins\blood\blood.py", line 22, in _pre_take_damage
    weapon_index = info.weapon

ValueError: Attacker is not a player.
Last edited by Ayuto on Tue May 28, 2019 3:59 pm, edited 1 time in total.
Reason: Added missing code tags
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: [HL2:DM] Headshot Help

Postby Ayuto » Tue May 28, 2019 7:05 pm

There are multiple versions of that script in this thread. Which version do you use? This should be the latest one:
viewtopic.php?p=9456#p9456

None of your tracebacks match that code, so please try that code and see if the issue still occurs.
User avatar
satoon101
Project Leader
Posts: 2698
Joined: Sat Jul 07, 2012 1:59 am

Re: [HL2:DM] Headshot Help

Postby satoon101 » Tue May 28, 2019 7:10 pm

Also, there are 3 different plugins represented in your Tracebacks: blood, headshot, explosive

It would help if you only post the ones relevant to this thread.
Image
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Tue May 28, 2019 8:05 pm

Syntax: Select all

2019-05-28 15:01:09 - sp	-	EXCEPTION	
[SP] Caught an Exception:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 92, in _pre_take_damage
_damage_weapons[victim.userid] = Player(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)

ValueError: Index '145' is not a valid player.
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: [HL2:DM] Headshot Help

Postby Ayuto » Tue May 28, 2019 8:40 pm

Ayuto wrote:There are multiple versions of that script in this thread. Which version do you use? This should be the latest one:
viewtopic.php?p=9456#p9456

None of your tracebacks match that code, so please try that code and see if the issue still occurs.

Did you even read this? You seem to ignore any advice, which makes it hard to help you. You had multiple chances to help us helping you...

I'm out. This is ridiculous. Sorry.
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Tue May 28, 2019 8:49 pm

ok,,i am done. sorry i asked. have a great day.
User avatar
Painkiller
Senior Member
Posts: 726
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: [HL2:DM] Headshot Help

Postby Painkiller » Tue May 28, 2019 9:08 pm

Reading what Ayuto writes, you've run into the wall he wants to help you and you just can't read what to do. :mad:
User avatar
satoon101
Project Leader
Posts: 2698
Joined: Sat Jul 07, 2012 1:59 am

Re: [HL2:DM] Headshot Help

Postby satoon101 » Tue May 28, 2019 11:22 pm

That Traceback does match the script in the linked post. I'm not sure in what situation the attacker equals the inflictor and it is not a player. It's either a weird HL2:DM issue or I believe you mentioned you have custom weapons on your server, which could be causing this.

If you would, try this out and post the new Traceback here:

Syntax: Select all

from contextlib import suppress

from engines.precache import Model
from engines.sound import Sound
from entities import TakeDamageInfo
from entities.entity import Entity
from entities.hooks import EntityCondition, EntityPreHook
from events import Event
from listeners.tick import Delay
from memory import make_object
from players.constants import HitGroup
from players.entity import Player
from stringtables.downloads import Downloadables


# =============================================================================
# >> CONFIGURATION
# =============================================================================
REMOVE_OVERLAY_TIME = 1.5

HEADSHOT_OVERLAY_VMT_ATTACKER = "exae/rocksheadshot1.vmt"
HEADSHOT_OVERLAY_VTF_ATTACKER = "exae/rocksheadshot1.vtf"

HEADSHOT_OVERLAY_VMT_VICTIM = "exae/rocksheadshot1.vmt"
HEADSHOT_OVERLAY_VTF_VICTIM = "exae/rocksheadshot1.vtf"

# Headshot but not dead sound + path
HEADSHOT_SOUND = 'exae/quake/human-hit-4.mp3'

# <weapon> : <headshot_sound>
WEAPON_FILES = {
'weapon_crossbow': 'exae/quake/headshot2.mp3',
'weapon_357' : 'exae/quake/headshot-2.mp3',
'weapon_smg1' : 'exae/quake/wife-headshot.mp3',
'weapon_ar2' : 'exae/quake/boomheadshot.mp3',
'weapon_pistol' : 'exae/quake/headshot-1.mp3',
'weapon_shotgun' : 'exae/quake/headshot2.mp3'
}

DEAD_MODEL_PATH = 'models/headless_body/metrocop.mdl'
DEAD_MODEL_DL_FILES = [
"models/headless_body/metrocop.dx80.vtx",
"models/headless_body/metrocop.dx90.vtx",
"models/headless_body/metrocop.mdl",
"models/headless_body/metrocop.phy",
"models/headless_body/metrocop.sw.vtx",
"models/headless_body/metrocop.vvd",
]
# =============================================================================
# >> END OF CONFIGURATION
# =============================================================================


HEADSHOT_SOUND = Sound(HEADSHOT_SOUND, download=True)
WEAPON_FILES = {x: Sound(y, download=True) for x, y in WEAPON_FILES.items()}
downloads = Downloadables()
for item in (HEADSHOT_OVERLAY_VMT_ATTACKER, HEADSHOT_OVERLAY_VTF_ATTACKER,
HEADSHOT_OVERLAY_VMT_VICTIM, HEADSHOT_OVERLAY_VTF_VICTIM):
downloads.add('materials/' + item)

for item in DEAD_MODEL_DL_FILES:
downloads.add(item)

DEAD_MODEL = Model(
path=DEAD_MODEL_PATH,
preload=True,
)

_old_models = {}
_damage_weapons = {}


@EntityPreHook(EntityCondition.is_player, 'on_take_damage')
def _pre_take_damage(stack_data):
victim = make_object(Entity, stack_data[0])
if not victim.is_player():
return

victim = Player(victim.index)
info = make_object(TakeDamageInfo, stack_data[1])

# World damage?
if info.attacker == 0:
_damage_weapons[victim.userid] = 'worldspawn'

# Was a projectile used?
elif info.attacker != info.inflictor:
_damage_weapons[victim.userid] = Entity(info.inflictor).classname

# Not a projectile
else:
try:
_damage_weapons[victim.userid] = Player(info.attacker).active_weapon.classname
except ValueError:
entity = Entity(info.attacker)
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')


@Event('player_hurt')
def player_hurt(game_event):
victim = Player.from_userid(game_event['userid'])
attacker_userid = game_event['attacker']

# Suicide?
if attacker_userid in (victim.userid, 0):
return

# Not a headshot?
if victim.hitgroup != HitGroup.HEAD:
return

# Victim still alive?
if game_event['health']:
HEADSHOT_SOUND.index = victim.index
HEADSHOT_SOUND.play(victim.index)
return

weapon_sound = WEAPON_FILES.get(_damage_weapons.get(victim.userid))
if weapon_sound is None:
return

attacker = Player.from_userid(attacker_userid)

# Play weapon specific headshot sound
weapon_sound.play(attacker.index)

# Set the victim's overlay
victim.client_command(
'r_screenoverlay {overlay}'.format(
overlay=HEADSHOT_OVERLAY_VMT_VICTIM
)
)
Delay(REMOVE_OVERLAY_TIME, _remove_overlay, [victim.userid])

# Set the attacker's overlay
attacker.client_command(
'r_screenoverlay {overlay}'.format(
overlay=HEADSHOT_OVERLAY_VMT_ATTACKER
)
)
Delay(REMOVE_OVERLAY_TIME, _remove_overlay, [attacker_userid])

# Set the victim's model
_old_models[victim.userid] = victim.model
victim.model = DEAD_MODEL


@Event('player_spawn')
def _reset_model(game_event):
userid = game_event['userid']
old_model = _old_models.pop(userid, None)
if old_model is not None:
Player.from_userid(userid).model = old_model


def _remove_overlay(userid):
with suppress(Exception):
Player.from_userid(userid).client_command('r_screenoverlay 0')
Image
User avatar
L'In20Cible
Project Leader
Posts: 1534
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: [HL2:DM] Headshot Help

Postby L'In20Cible » Wed May 29, 2019 2:10 am

satoon101 wrote:That Traceback does match the script in the linked post. I'm not sure in what situation the attacker equals the inflictor and it is not a player. It's either a weird HL2:DM issue or I believe you mentioned you have custom weapons on your server, which could be causing this.

This can also happens when using a point_hurt entity (or any other that deals damage such as env_explosion, etc.) that sets the activator to itself rather than the player. I believe es damage had this behavior and I believe he mentioned somewhere that he was still using ES? Either way, something like this should handles these cases:

Syntax: Select all

# Not a projectile
else:
entity = BaseEntity(info.attacker)
if entity.is_player():
_damage_weapons[victim.userid] = Player(entity.index).active_weapon.classname
else:
_damage_weapons[victim.userid] = entity.classname
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Wed May 29, 2019 2:17 am

Do i add that to the script?
User avatar
L'In20Cible
Project Leader
Posts: 1534
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: [HL2:DM] Headshot Help

Postby L'In20Cible » Wed May 29, 2019 2:23 am

daren adler wrote:Do i add that to the script?

No, use the code Satoon gave you above:
satoon101 wrote:

Syntax: Select all

from contextlib import suppress

from engines.precache import Model
from engines.sound import Sound
from entities import TakeDamageInfo
from entities.entity import Entity
from entities.hooks import EntityCondition, EntityPreHook
from events import Event
from listeners.tick import Delay
from memory import make_object
from players.constants import HitGroup
from players.entity import Player
from stringtables.downloads import Downloadables


# =============================================================================
# >> CONFIGURATION
# =============================================================================
REMOVE_OVERLAY_TIME = 1.5

HEADSHOT_OVERLAY_VMT_ATTACKER = "exae/rocksheadshot1.vmt"
HEADSHOT_OVERLAY_VTF_ATTACKER = "exae/rocksheadshot1.vtf"

HEADSHOT_OVERLAY_VMT_VICTIM = "exae/rocksheadshot1.vmt"
HEADSHOT_OVERLAY_VTF_VICTIM = "exae/rocksheadshot1.vtf"

# Headshot but not dead sound + path
HEADSHOT_SOUND = 'exae/quake/human-hit-4.mp3'

# <weapon> : <headshot_sound>
WEAPON_FILES = {
'weapon_crossbow': 'exae/quake/headshot2.mp3',
'weapon_357' : 'exae/quake/headshot-2.mp3',
'weapon_smg1' : 'exae/quake/wife-headshot.mp3',
'weapon_ar2' : 'exae/quake/boomheadshot.mp3',
'weapon_pistol' : 'exae/quake/headshot-1.mp3',
'weapon_shotgun' : 'exae/quake/headshot2.mp3'
}

DEAD_MODEL_PATH = 'models/headless_body/metrocop.mdl'
DEAD_MODEL_DL_FILES = [
"models/headless_body/metrocop.dx80.vtx",
"models/headless_body/metrocop.dx90.vtx",
"models/headless_body/metrocop.mdl",
"models/headless_body/metrocop.phy",
"models/headless_body/metrocop.sw.vtx",
"models/headless_body/metrocop.vvd",
]
# =============================================================================
# >> END OF CONFIGURATION
# =============================================================================


HEADSHOT_SOUND = Sound(HEADSHOT_SOUND, download=True)
WEAPON_FILES = {x: Sound(y, download=True) for x, y in WEAPON_FILES.items()}
downloads = Downloadables()
for item in (HEADSHOT_OVERLAY_VMT_ATTACKER, HEADSHOT_OVERLAY_VTF_ATTACKER,
HEADSHOT_OVERLAY_VMT_VICTIM, HEADSHOT_OVERLAY_VTF_VICTIM):
downloads.add('materials/' + item)

for item in DEAD_MODEL_DL_FILES:
downloads.add(item)

DEAD_MODEL = Model(
path=DEAD_MODEL_PATH,
preload=True,
)

_old_models = {}
_damage_weapons = {}


@EntityPreHook(EntityCondition.is_player, 'on_take_damage')
def _pre_take_damage(stack_data):
victim = make_object(Entity, stack_data[0])
if not victim.is_player():
return

victim = Player(victim.index)
info = make_object(TakeDamageInfo, stack_data[1])

# World damage?
if info.attacker == 0:
_damage_weapons[victim.userid] = 'worldspawn'

# Was a projectile used?
elif info.attacker != info.inflictor:
_damage_weapons[victim.userid] = Entity(info.inflictor).classname

# Not a projectile
else:
try:
_damage_weapons[victim.userid] = Player(info.attacker).active_weapon.classname
except ValueError:
entity = Entity(info.attacker)
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')


@Event('player_hurt')
def player_hurt(game_event):
victim = Player.from_userid(game_event['userid'])
attacker_userid = game_event['attacker']

# Suicide?
if attacker_userid in (victim.userid, 0):
return

# Not a headshot?
if victim.hitgroup != HitGroup.HEAD:
return

# Victim still alive?
if game_event['health']:
HEADSHOT_SOUND.index = victim.index
HEADSHOT_SOUND.play(victim.index)
return

weapon_sound = WEAPON_FILES.get(_damage_weapons.get(victim.userid))
if weapon_sound is None:
return

attacker = Player.from_userid(attacker_userid)

# Play weapon specific headshot sound
weapon_sound.play(attacker.index)

# Set the victim's overlay
victim.client_command(
'r_screenoverlay {overlay}'.format(
overlay=HEADSHOT_OVERLAY_VMT_VICTIM
)
)
Delay(REMOVE_OVERLAY_TIME, _remove_overlay, [victim.userid])

# Set the attacker's overlay
attacker.client_command(
'r_screenoverlay {overlay}'.format(
overlay=HEADSHOT_OVERLAY_VMT_ATTACKER
)
)
Delay(REMOVE_OVERLAY_TIME, _remove_overlay, [attacker_userid])

# Set the victim's model
_old_models[victim.userid] = victim.model
victim.model = DEAD_MODEL


@Event('player_spawn')
def _reset_model(game_event):
userid = game_event['userid']
old_model = _old_models.pop(userid, None)
if old_model is not None:
Player.from_userid(userid).model = old_model


def _remove_overlay(userid):
with suppress(Exception):
Player.from_userid(userid).client_command('r_screenoverlay 0')

Then look your console for errors and copy-paste the entire traceback which should tell us more about what kind of entity is dealing the damage.
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Wed May 29, 2019 5:32 am

Syntax: Select all

2019-05-29 00:26:48 - sp	-	MESSAGE	[SP] Loading plugin 'country_tag'...
2019-05-29 00:26:48 - sp - MESSAGE [SP] Successfully loaded plugin 'country_tag'.
2019-05-29 00:26:48 - sp - MESSAGE [SP] Loading plugin 'killmessage'...
2019-05-29 00:26:48 - sp - MESSAGE [SP] Successfully loaded plugin 'killmessage'.
2019-05-29 00:26:48 - sp - MESSAGE [SP] Loading plugin 'headshot'...
2019-05-29 00:26:48 - sp - MESSAGE [SP] Successfully loaded plugin 'headshot'.
2019-05-29 00:26:48 - sp - MESSAGE [SP] Unloading plugin 'killmessage'...
2019-05-29 00:26:49 - sp - MESSAGE [SP] Successfully unloaded plugin 'killmessage'.
2019-05-29 00:26:49 - sp - MESSAGE [SP] Unloading plugin 'headshot'...
2019-05-29 00:26:49 - sp - MESSAGE [SP] Successfully unloaded plugin 'headshot'.
2019-05-29 00:26:49 - sp - MESSAGE [SP] Loading plugin 'killmessage'...
2019-05-29 00:26:49 - sp - MESSAGE [SP] Successfully loaded plugin 'killmessage'.
2019-05-29 00:26:49 - sp - MESSAGE [SP] Loading plugin 'headshot'...
2019-05-29 00:26:49 - sp - MESSAGE [SP] Successfully loaded plugin 'headshot'.
2019-05-29 00:26:52 - sp - MESSAGE [SP] Unloading plugin 'killmessage'...
2019-05-29 00:26:52 - sp - MESSAGE [SP] Successfully unloaded plugin 'killmessage'.
2019-05-29 00:26:52 - sp - MESSAGE [SP] Unloading plugin 'headshot'...
2019-05-29 00:26:52 - sp - MESSAGE [SP] Successfully unloaded plugin 'headshot'.
2019-05-29 00:26:53 - sp - MESSAGE [SP] Loading plugin 'killmessage'...
2019-05-29 00:26:53 - sp - MESSAGE [SP] Successfully loaded plugin 'killmessage'.
2019-05-29 00:26:53 - sp - MESSAGE [SP] Loading plugin 'headshot'...
2019-05-29 00:26:53 - sp - MESSAGE [SP] Successfully loaded plugin 'headshot'.
2019-05-29 00:26:57 - sp - MESSAGE [SP] Unloading plugin 'killmessage'...
2019-05-29 00:26:57 - sp - MESSAGE [SP] Successfully unloaded plugin 'killmessage'.
2019-05-29 00:26:57 - sp - MESSAGE [SP] Unloading plugin 'headshot'...
2019-05-29 00:26:57 - sp - MESSAGE [SP] Successfully unloaded plugin 'headshot'.
2019-05-29 00:26:57 - sp - MESSAGE [SP] Loading plugin 'killmessage'...
2019-05-29 00:26:57 - sp - MESSAGE [SP] Successfully loaded plugin 'killmessage'.
2019-05-29 00:26:57 - sp - MESSAGE [SP] Loading plugin 'headshot'...
2019-05-29 00:26:57 - sp - MESSAGE [SP] Successfully loaded plugin 'headshot'.
2019-05-29 00:28:16 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '443' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "443" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:16 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '443' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "443" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:16 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '443' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "443" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:17 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '443' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "443" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:17 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '443' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "443" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:19 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '443' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "443" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:20 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '443' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "443" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:20 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '443' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "443" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:20 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '443' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "443" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:20 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '443' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "443" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:30 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '446' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "446" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:30 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '446' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "446" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:31 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '446' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "446" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:31 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '446' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "446" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:31 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '446' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "446" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:34 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '565' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "565" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:34 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '565' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "565" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:35 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '565' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "565" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:35 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '565' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "565" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:35 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '565' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "565" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:56 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '465' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "465" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:57 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '465' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "465" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:57 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '465' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "465" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:57 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '465' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "465" is not a valid player. Entity classname: entityflame


2019-05-29 00:28:57 - 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(info.attacker).active_weapon.classname
File "..\addons\source-python\packages\source-python\players\_base.py", line 88, in __init__
super().__init__(index)
File "..\addons\source-python\packages\source-python\entities\_base.py", line 94, in __init__
super().__init__(index)
ValueError: Index '465' is not a valid player.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "..\addons\source-python\plugins\headshot\headshot.py", line 96, in _pre_take_damage
raise ValueError(f'Index "{info.attacker}" is not a valid player. Entity classname: {entity.classname}')

ValueError: Index "465" is not a valid player. Entity classname: entityflame
User avatar
daren adler
Senior Member
Posts: 348
Joined: Sat May 18, 2019 7:42 pm

Re: [HL2:DM] Headshot Help

Postby daren adler » Wed May 29, 2019 5:39 am

Here it is, in case i am showing it to you wrong.
https://www.dropbox.com/sh/z62a5d08iynu ... htn9a?dl=0

Return to “Plugin Requests”

Who is online

Users browsing this forum: No registered users and 4 guests