<commit_before>/*
		Weapon shots handler
		Mostly used for the Take/Give damage callbacks`
*/

#define SERVER_PlAYER_DEATH_DELAY				50			// Time (in milliseconds) delay before server-sided death takes place

#define MAX_VISUAL_DAMAGES				4 			// Max number of damages that can be visual to player (given/taken damage textdraws)
#define DAMAGE_BUBBLE_STRING_LENGTH		\	
								MAX_VISUAL_DAMAGES * 70	// Taken damage bubble string length
#define DAMAGE_TEXTDRAW_Y_DIFF			10.0		// A good space between each damage textdraw
#define HIDE_DAMAGE_TEXTDRAW_AFTER		5000		// Time needed to hide visual damage textdraw (milliseconds)
#define NO_DAMAGER_UNIQUE_ID			-2			// This is helpful in textdraw loops to indicate a textdraw that shows no damager (collision damage?)

#define GRENADE_HIGH_DAMAGE			16.0						// Modified grenade damage	
#define	GRENADE_MEDIUM_DAMAGE		GRENADE_HIGH_DAMAGE / 2		// Modified grenade damage
#define	GRENADE_LOW_DAMAGE			GRENADE_HIGH_DAMAGE / 3		// Modified grenade damage
#define GRENADE_AMMO				3							// Grenade ammo amount

// Body part names
new BodyPartName[10][] = 
{
	{"Unknown1"}, {"Unknown2"}, {"Unknown3"}, {"Torso"}, {"Groin"}, 
	{"Left Arm"}, {"Right Arm"}, {"Left Leg"}, {"Right Leg"}, {"Head"}
};

enum VISUAL_DAMAGE_DATA
{
	Float:TDamageTaken[MAX_VISUAL_DAMAGES], 	// Total damage taken
	Float:TDamageGiven[MAX_VISUAL_DAMAGES], 	// Total damage given
	bool:ShownTakenDamage[MAX_VISUAL_DAMAGES], 	// Indicate whether the (taken) damage textdraws are shown or not
	bool:ShownGivenDamage[MAX_VISUAL_DAMAGES],	// Indicate whether the (given) damage textdraws are shown or not
	TakenDamageWeapon[MAX_VISUAL_DAMAGES],		// The weapon by which taken damage was done
	GivenDamageWeapon[MAX_VISUAL_DAMAGES],		// The weapon by which given damage was done	
	DamagingWho[MAX_VISUAL_DAMAGES],			// Who this player is damaging
	WhoDamaging[MAX_VISUAL_DAMAGES],			// Who is damaging this player
	TakenDamageTick[MAX_VISUAL_DAMAGES],		// Last time a taken-damage textdraw was shown
	GivenDamageTick[MAX_VISUAL_DAMAGES]			// Last time a given-damage textdraw was shown
}

new VisualDamage[MAX_PLAYERS][VISUAL_DAMAGE_DATA];
new 
	Iterator:PlayersDamaged[MAX_PLAYERS]<MAX_PLAYERS>,		// This array holds the IDs of the players who this player put hits/damage on
	Iterator:PlayersDamagedBy[MAX_PLAYERS]<MAX_PLAYERS>,	// This array holds the IDs of the players who put hits/damage on this player
	Iterator:PlayerHasTVisualDmg<MAX_PLAYERS>,				// This array holds the IDs of the players who has a taken-damage textdraw shown for them
	Iterator:PlayerHasGVisualDmg<MAX_PLAYERS>;				// This array holds the IDs of the players who has a given-damage textdraw shown for them
	
new const Float:WEAPON_RANGES_ADD = 14.0;	
	
// Weapon max hitting ranges from Slice's weapon-config inc 
// Source: https://github.com/oscar-broman/samp-weapon-config
new Float:WeaponRanges[] = {
	0.0, // 0 - Fist
	0.0, // 1 - Brass knuckles
	0.0, // 2 - Golf club
	0.0, // 3 - Nitestick
	0.0, // 4 - Knife
	0.0, // 5 - Bat
	0.0, // 6 - Shovel
	0.0, // 7 - Pool cue
	0.0, // 8 - Katana
	0.0, // 9 - Chainsaw
	0.0, // 10 - Dildo
	0.0, // 11 - Dildo 2
	0.0, // 12 - Vibrator
	0.0, // 13 - Vibrator 2
	0.0, // 14 - Flowers
	0.0, // 15 - Cane
	0.0, // 16 - Grenade
	0.0, // 17 - Teargas
	0.0, // 18 - Molotov
	90.0, // 19 - Vehicle M4 (custom)
	75.0, // 20 - Vehicle minigun (custom)
	0.0, // 21
	35.0, // 22 - Colt 45
	35.0, // 23 - Silenced
	35.0, // 24 - Deagle
	40.0, // 25 - Shotgun<commit_msg>Increment weapon ranges<commit_after>/*
		Weapon shots handler
		Mostly used for the Take/Give damage callbacks`
*/

#define SERVER_PlAYER_DEATH_DELAY				50			// Time (in milliseconds) delay before server-sided death takes place

#define MAX_VISUAL_DAMAGES				4 			// Max number of damages that can be visual to player (given/taken damage textdraws)
#define DAMAGE_BUBBLE_STRING_LENGTH		\	
								MAX_VISUAL_DAMAGES * 70	// Taken damage bubble string length
#define DAMAGE_TEXTDRAW_Y_DIFF			10.0		// A good space between each damage textdraw
#define HIDE_DAMAGE_TEXTDRAW_AFTER		5000		// Time needed to hide visual damage textdraw (milliseconds)
#define NO_DAMAGER_UNIQUE_ID			-2			// This is helpful in textdraw loops to indicate a textdraw that shows no damager (collision damage?)

#define GRENADE_HIGH_DAMAGE			16.0						// Modified grenade damage	
#define	GRENADE_MEDIUM_DAMAGE		GRENADE_HIGH_DAMAGE / 2		// Modified grenade damage
#define	GRENADE_LOW_DAMAGE			GRENADE_HIGH_DAMAGE / 3		// Modified grenade damage
#define GRENADE_AMMO				3							// Grenade ammo amount

// Body part names
new BodyPartName[10][] = 
{
	{"Unknown1"}, {"Unknown2"}, {"Unknown3"}, {"Torso"}, {"Groin"}, 
	{"Left Arm"}, {"Right Arm"}, {"Left Leg"}, {"Right Leg"}, {"Head"}
};

enum VISUAL_DAMAGE_DATA
{
	Float:TDamageTaken[MAX_VISUAL_DAMAGES], 	// Total damage taken
	Float:TDamageGiven[MAX_VISUAL_DAMAGES], 	// Total damage given
	bool:ShownTakenDamage[MAX_VISUAL_DAMAGES], 	// Indicate whether the (taken) damage textdraws are shown or not
	bool:ShownGivenDamage[MAX_VISUAL_DAMAGES],	// Indicate whether the (given) damage textdraws are shown or not
	TakenDamageWeapon[MAX_VISUAL_DAMAGES],		// The weapon by which taken damage was done
	GivenDamageWeapon[MAX_VISUAL_DAMAGES],		// The weapon by which given damage was done	
	DamagingWho[MAX_VISUAL_DAMAGES],			// Who this player is damaging
	WhoDamaging[MAX_VISUAL_DAMAGES],			// Who is damaging this player
	TakenDamageTick[MAX_VISUAL_DAMAGES],		// Last time a taken-damage textdraw was shown
	GivenDamageTick[MAX_VISUAL_DAMAGES]			// Last time a given-damage textdraw was shown
}

new VisualDamage[MAX_PLAYERS][VISUAL_DAMAGE_DATA];
new 
	Iterator:PlayersDamaged[MAX_PLAYERS]<MAX_PLAYERS>,		// This array holds the IDs of the players who this player put hits/damage on
	Iterator:PlayersDamagedBy[MAX_PLAYERS]<MAX_PLAYERS>,	// This array holds the IDs of the players who put hits/damage on this player
	Iterator:PlayerHasTVisualDmg<MAX_PLAYERS>,				// This array holds the IDs of the players who has a taken-damage textdraw shown for them
	Iterator:PlayerHasGVisualDmg<MAX_PLAYERS>;				// This array holds the IDs of the players who has a given-damage textdraw shown for them
	
new const Float:WEAPON_RANGES_ADD = 30.0;	
	
// Weapon max hitting ranges from Slice's weapon-config inc 
// Source: https://github.com/oscar-broman/samp-weapon-config
new Float:WeaponRanges[] = {
	0.0, // 0 - Fist
	0.0, // 1 - Brass knuckles
	0.0, // 2 - Golf club
	0.0, // 3 - Nitestick
	0.0, // 4 - Knife
	0.0, // 5 - Bat
	0.0, // 6 - Shovel
	0.0, // 7 - Pool cue
	0.0, // 8 - Katana
	0.0, // 9 - Chainsaw
	0.0, // 10 - Dildo
	0.0, // 11 - Dildo 2
	0.0, // 12 - Vibrator
	0.0, // 13 - Vibrator 2
	0.0, // 14 - Flowers
	0.0, // 15 - Cane
	0.0, // 16 - Grenade
	0.0, // 17 - Teargas
	0.0, // 18 - Molotov
	90.0, // 19 - Vehicle M4 (custom)
	75.0, // 20 - Vehicle minigun (custom)
	0.0, // 21
	35.0, // 22 - Colt 45
	35.0, // 23 - Silenced
	35.0, // 24 - Deagle
	40.0, // 25 - Shotgun
{'fraction_non_alphanumeric': 0.10662080825451418, 'fraction_numerical': 0.037833190025795355, 'mean_word_length': 3.4198860037998733, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5097206', 'n_tokens_mistral': 2818, 'n_tokens_neox': 2573, 'n_words': 763}