Advance Medical System - visn_are
Related Script Changes to note when working with visn_are
if isDead() or not canOpenPhone or exports["visn_are"]:GetSharedVariables().ClientHealthBuffer.unconscious then return endHookEventHandler(ENUM_HOOKABLE_EVENTS.UNCONSCIOUS_STATE_CHANGED, function(newState)
function lockInv(toggle)
if toggle then LocalPlayer.state:set("inv_busy", true, true) TriggerEvent('inventory:client:busy:status', true) TriggerEvent('canUseInventoryAndHotbar:toggle', false)
else LocalPlayer.state:set("inv_busy", false, true) TriggerEvent('inventory:client:busy:status', false) TriggerEvent('canUseInventoryAndHotbar:toggle', true) end
end
if newState then -- Player is unconscious now
-- This disables the player from peaking/"targeting" anyone when talking
exports['pma-voice']:overrideProximityCheck(function(player)
return false
end)
lockInv(true) -- Disables use of qs-inventory
else -- Player is conscious now true
exports['pma-voice']:resetProximityCheck() -- Resets Players Voice Allowing them to speak again
lockInv(false)
end
ResetThirstHungerStatus()
end)Last updated