Syntax: Select all
@PreEvent('player_death')
def pre_player_death(data):
victim = _players.from_userid(data['userid'])
if victim.team == 3:
print("victim was a ct")
print(list(victim.weapons()))
for weapon in list(victim.weapons()):
print("removing weapons")
weapon.remove()
This isn't working as expected, as the death prehook still doesn't start when the player has weapons.
I'm unsure if there's any other simple way other than just logging what weapons a player has when they die so I can remove those ents.
(for the sake of the plugin I'm making, I need cts to not drop weapons on dying or else it'll be given to the Ts, however, the Ts still need to be able to drop weapons for CTs to take)
Thanks! - Grubbsy