MeleeActionDamage
Client-Side Function
JavaScript |
---|
JavaScript Syntax
Parameters
- source: Object
- target: Object
- weaponHash: number
- damage: number
- isCritical: boolean
Return value
- void
Syntax
mp.events.add('meleeActionDamage', (source, target, weaponHash, damage, isCritical) => {});
Example
mp.events.add('meleeActionDamage', (source, target, weaponHash, damage, isCritical) => {
if (damage >= 500) { //disable instant 'stealth' kill
return true;
}
});
See Also
Browser
Checkpoints
Colshapes
Console
Common
- click
- playerChat
- playerCommand
- playerDeath
- playerJoin
- playerQuit
- playerReady
- playerResurrect
- playerRuleTriggered
- playerSpawn
- playerWeaponShot
- addDataHandler
- dummyEntityCreated
- dummyEntityDestroyed
- entityControllerChange
- replayEditorRequest