RegisterNetEvent('tgds:client:masktak')
AddEventHandler('tgds:client:masktak', function()
item['gasMask'] = not item['gasMask']
if item['gasMask'] then
loadAnimDict('mp_masks@standard_car@ds@')
TaskPlayAnim(PlayerPedId(), 'mp_masks@standard_car@ds@', 'put_on_mask', 8.0, 8.0, 800, 16, 0, false, false, false)
SetPedComponentVariation(PlayerPedId(), 1, Config['item']['gasMask']['giyilecek'], 0, 1)
else
loadAnimDict('mp_masks@standard_car@ds@')
TaskPlayAnim(PlayerPedId(), 'mp_masks@standard_car@ds@', 'put_on_mask', 8.0, 8.0, 800, 16, 0, false, false, false)
SetPedComponentVariation(PlayerPedId(), 1, 0, 0, 1)
end
end)