HEX
HexscriptsClassicSync

Events

This section lists all client-side and server-side events in this script. Events allow you to add custom listeners that capture and respond to actions triggered by this script.

Note

If you need additional events for your implementation, please open a ticket on our Discord server.

Client Events

No client events are available at the moment.

Server Events

hex_sync:setCustomDamage

Sets custom damage values for each body part for a specific weapon. if false it will reset the damage values to default.

TriggerEvent('hex_sync:setCustomDamage', playerId, {
    [joaat('WEAPON_PISTOL')] = {
        ['PELVIS'] = 1,
        ['L_CALF'] = 1,
        ['L_FOOT'] = 1,
        ['L_PH_FOOT'] = 1,
        ['R_CALF'] = 1,
        ['R_FOOT'] = 1,
        ['R_PH_FOOT'] = 1,
        ['SPINE'] = 1,
        ['SPINE1'] = 1,
        ['SPINE2'] = 1,
        ['SPINE3'] = 1,
        ['R_UPPERARM'] = 1,
        ['R_FOREARM'] = 1,
        ['R_HAND'] = 1,
        ['R_FINGERS'] = 1,
        ['L_UPPERARM'] = 1,
        ['L_FOREARM'] = 1,
        ['L_HAND'] = 1,
        ['L_FINGERS'] = 1,
        ['NECK'] = 1,
        ['HEAD'] = 1
    }
})

Prop

Type

Example:

RegisterCommand('setCustomDamage', function(playerId, args)
    TriggerEvent('hex_sync:setCustomDamage', playerId, {
        [joaat('WEAPON_PISTOL')] = {
            ['PELVIS'] = 1,
            ['L_CALF'] = 1,
            ['L_FOOT'] = 1,
            ['L_PH_FOOT'] = 1,
            ['R_CALF'] = 1,
            ['R_FOOT'] = 1,
            ['R_PH_FOOT'] = 1,
            ['SPINE'] = 1,
            ['SPINE1'] = 1,
            ['SPINE2'] = 1,
            ['SPINE3'] = 1,
            ['R_UPPERARM'] = 1,
            ['R_FOREARM'] = 1,
            ['R_HAND'] = 1,
            ['R_FINGERS'] = 1,
            ['L_UPPERARM'] = 1,
            ['L_FOREARM'] = 1,
            ['L_HAND'] = 1,
            ['L_FINGERS'] = 1,
            ['NECK'] = 1,
            ['HEAD'] = 1
        }
    })
end)

RegisterCommand('removeCustomDamage', function(playerId, args)
    TriggerEvent('hex_sync:setCustomDamage', playerId, false)
end)