RegisterKeyMapping('+heal', 'Heal', 'keyboard', 'F1')
RegisterKeyMapping('+armor', 'Armor', 'keyboard', 'F2')
RegisterCommand("+heal", function()
local ped = PlayerPedId()
if GetEntityHealth(ped) == 100 then
QBCore.Functions.Notify('Canın Zaten Full')
return
end
QBCore.Functions.Progressbar("heal", "Heal...", 5000, false, true, {
disableMovement = false,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {}, {}, {}, function() -- Done
SetEntityHealth(ped, 200)
end, function() -- Cancel
QBCore.Functions.Notify('İptal Edildi')
end)
end)
RegisterCommand("+armor", function()
local ped = PlayerPedId()
if GetPedArmour(ped) == 100 then
QBCore.Functions.Notify('Armorun zaten full')
return
end
QBCore.Functions.Progressbar("armor", "Armour...", 5000, false, true, {
disableMovement = false,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {}, {}, {}, function() -- Done
SetPedArmour(ped, 100)
end, function() -- Cancel
QBCore.Functions.Notify('İptal Edildi')
end)
end)