const MeleeWeapon: string[] = ["weapon_dagger", "weapon_bat", "weapon_bottle", "weapon_crowbar", "weapon_unarmed", "weapon_flashlight", "weapon_golfclub",
"weapon_hammer", "weapon_hatchet","weapon_knuckle","weapon_knife","weapon_machete","weapon_switchblade","weapon_nightstick","weapon_wrench","weapon_battleaxe","weapon_poolcue","weapon_stone_hatchet"]
setInterval(() => {
MeleeWeapon.map(name => {
let hash = mp.game.joaat(name.toUpperCase());
if (mp.game.invoke(methods.HAS_PED_GOT_WEAPON, mp.players.local.handle, hash, false)) {
mp.game.controls.enableControlAction(32, 142, true);
} else {
mp.game.controls.disableControlAction(32, 142, true);
}
});
}, 1000);
mp.game.player.setWeaponDamageModifier(0.3);
mp.game.player.setMeleeWeaponDefenseModifier(-2);