Morimaru 0 Report post Posted January 14 Hi all, I'm looking for a script for my private mod that shows the distance in meters of a headshot on the notification feed. *Example - [ Headshot ] J. Doe [ 117m] My modding knowledge is plenty basic, and absolutely no idea about phyton coding. I'm trying to understand phyton files of Wookie's Sniper Mod (that makes the thing) but I am mental blind, because I understand nothing. Some helpful soul bring me a hand? Thank you so much! Quote Share this post Link to post Share on other sites
Morimaru 0 Report post Posted January 21 (edited) I'm on the right way? Quote class killevent: def __init__(self, attacker, victim, template): self.attacker = attacker self.victim = victim # determine target distance distance = vector.getDistance(playermanager.getPosition(attacker), playermanager.getPosition(victim)) self.distance = int(math.ceil(distance)) self.distanceScore = int(math.ceil(distance/100.0) * 5) self.weapon = constant.getName(template) self.weaponType = constant.getType(template) def process(self): # determine hit region if self.victim.isManDown() == 0: self.region = "headshot" self.regionScore = 20 else: self.region = "bodyshot" self.regionScore = 0 # SCORE / MESSAGE # rifle score elif self.weaponType == constant.rifle: self.score = self.distanceScore + self.regionScore + self.speedScore + self.stanceScore self.text = "%s [%s] %s [%+i] (%sm - %s - %s - %s)" % (playermanager.getName(self.attacker), self.weapon, playermanager.getName(self.victim), self.score, self.distance, self.region) common.message(self.text) Edited January 21 by Morimaru Quote Share this post Link to post Share on other sites