Lisez-moi
# Fonction de barre de progression QBCore.Functions.Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel) exports['izzy-hudv5']:Progress({ name = name:lower(), duration = duration, label = label, useWhileDead = useWhileDead, canCancel = canCancel, controlDisables = disableControls, animation = animation, prop = prop, propTwo = propTwo, }, function(cancelled) si non annulé alors si onFinish alors onFinish() fin sinon si onCancel alors onCancel() fin fin fin) fin # Fonction de notification QBCore.Functions.Notify(texte, type de texte, longueur) type de texte = type de texte == "succès" et "succès" ou type de texte == "erreur" et "erreur" ou "informer" longueur = longueur ou 5000 si type(texte) == 'table' alors local ttext = text.text ou 'Placeholder' local caption = text.caption ou 'Placeholder' exports['izzy-hudv5']:addNotification(type, ttext, caption, length) else exports['izzy-hudv5']:addNotification(type, texttype == 'error' et 'Error' ou texttype == 'success' et 'Success' ou 'Notify', text, length) end end # Événements de stress (côté client) TriggerEvent("izzy-hudv5:client:gainStress", math.random(1, 3)) TriggerEvent("izzy-hudv5:client:relieveStress", math.random(1, 3))
