Standalone

Agency-Progressbar

Barra de progreso animada con 4 temas, acciones cancelables, efectos de sonido, exports de cliente y servidor. Sin dependencias requeridas.

v2.0.4Free5 Páginas
Agency-Progressbar

01 Exports & API

Client Exports

ExportDescription
StartProgress(data: table)Starts a progress bar with label, duration, theme, animation and onFinish/onCancel callbacks.
StopProgress(completed: boolean)Stops the active progress bar; passes completion state to onFinish.
IsProgressActive()Returns whether a progress bar is currently active.
GetProgressPercentage()Returns the current 0-100 completion percentage of the active bar.
SetProgressTheme(theme: string)Updates the live progress bar theme (e.g. 'modern').
SetProgressPosition(position: string)Updates the live progress bar position on screen.
TryReload(usedItem?: string)Initiates a secured weapon reload flow (validates ammo type and item server-side).
UseConsumable(itemName: string, isDrink: boolean)Plays the eat/drink progress with animation for the named item.

Server Exports

ExportDescription
StartProgressForPlayer(playerId: number, data: table)Starts a progress bar on a specific player from the server.
StopProgressForPlayer(playerId: number, completed?: boolean)Stops the active progress bar for a specific player.
StartProgressForAllPlayers(data: table)Broadcasts a progress bar to every connected player.
StopProgressForAllPlayers(completed?: boolean)Stops the active progress bar on every connected player.

Client Events

EventDescription
Agency:Progressbar:LoadSettingsLoads per-player UI settings (position, color, scale, style) from DB into the client.
agency-progressbar:client:startStarts the progress bar on the receiving client with the supplied data.
agency-progressbar:client:stopStops the active progress bar with a completion flag.
agency:consumables:useFoodInventory bridge to consume a food item (animation + secured server apply).
agency:consumables:useDrinkInventory bridge to consume a drink item (animation + secured server apply).

Server Events

EventDescription
Agency:Progressbar:SaveSettingsValidates and persists the player's progress bar UI settings to the DB.
agency-progressbar:server:startServer-side trigger to start a progress bar on a target (or self).
agency-progressbar:server:stopServer-side trigger to stop a progress bar on a target (or self).
agency:reload:requestValidates ammo/weapon/item before granting a reload to the requesting player.
agency:consumables:applyValidates inventory, removes one item and applies hunger/thirst gains.

Example: Start with callbacks

exports['Agency-Progressbar']:StartProgress({
    label      = 'Repairing Vehicle...',
    duration   = 5000,
    canCancel  = true,
    anim       = { dict = 'mini@repair', clip = 'fixing_a_player' },
    onComplete = function() print('Done!') end,
    onCancel   = function() print('Cancelled!') end,
})

¿Necesitas ayuda? ¡Únete a nuestro Discord!

Unirse a Discord