All Projects → Southclaws → progress2

Southclaws / progress2

Licence: other
A SA:MP UI library for rendering progress bars used to visualise all manner of data from health to a countdown timer.

Programming Languages

Pawn
127 projects
Makefile
30231 projects

Projects that are alternatives of or similar to progress2

amx assembly
Interesting #emit stuff
Stars: ✭ 49 (+16.67%)
Mutual labels:  sa-mp, pawn-package
PawnPlus
A SA-MP plugin enhancing the capabilities of the Pawn programming language
Stars: ✭ 79 (+88.1%)
Mutual labels:  sa-mp, pawn-package
sscanf
SA:MP sscanf plugin
Stars: ✭ 33 (-21.43%)
Mutual labels:  sa-mp, pawn-package
pawn-requests
pawn-requests provides an API for interacting with HTTP(S) JSON APIs.
Stars: ✭ 56 (+33.33%)
Mutual labels:  sa-mp, pawn-package
code-parse.inc
Pre-processor macros for analysing PAWN functions.
Stars: ✭ 23 (-45.24%)
Mutual labels:  sa-mp, pawn-package
pawn-stdlib
The Pawn Standard Library Package, not including any files related to SA:MP - designed for the sampctl package management system.
Stars: ✭ 13 (-69.05%)
Mutual labels:  sa-mp, pawn-package
GWRP-0.3
Игровой режим для San Andreas Multiplayer
Stars: ✭ 22 (-47.62%)
Mutual labels:  sa-mp
Open-GTO
RPG gamemode for SA-MP
Stars: ✭ 45 (+7.14%)
Mutual labels:  sa-mp
samp-foreach
foreach standalone include (non y_iterate version)
Stars: ✭ 20 (-52.38%)
Mutual labels:  sa-mp
pawn-memory
PAWN memory access plugin
Stars: ✭ 29 (-30.95%)
Mutual labels:  pawn-package
samp-ptl
SA:MP Plugin Template Library (C++17)
Stars: ✭ 16 (-61.9%)
Mutual labels:  sa-mp
ExtremeStudio
ExtremeStudio is a PAWN editor and is designed to be used in SA-MP development.
Stars: ✭ 25 (-40.48%)
Mutual labels:  sa-mp
samp-node-lib
NodeJS library for Scripting San Andreas Multiplayer:SAMP depends on samp-node plugin
Stars: ✭ 23 (-45.24%)
Mutual labels:  sa-mp
samp-discord-plugin
SA:MP Discord Rich Presence plugin
Stars: ✭ 63 (+50%)
Mutual labels:  sa-mp
eSelection
Dynamic model selection library for SA-MP servers
Stars: ✭ 28 (-33.33%)
Mutual labels:  sa-mp
samp-plugin-crashdetect
Crash/error reporting plugin for SA-MP server
Stars: ✭ 93 (+121.43%)
Mutual labels:  sa-mp
samp-plugin-jit
JIT plugin for SA-MP server (JIT compiler for Pawn 3.2)
Stars: ✭ 52 (+23.81%)
Mutual labels:  sa-mp
rustext
Fix Russian text plugin for SA-MP: GameText's, TextDraw's and Menu's
Stars: ✭ 15 (-64.29%)
Mutual labels:  sa-mp
samp-server-cli
Control server configuration via command line (without manually editing server.cfg)
Stars: ✭ 14 (-66.67%)
Mutual labels:  sa-mp
PacPaw
Pawn package manager for SA-MP
Stars: ✭ 14 (-66.67%)
Mutual labels:  sa-mp

progress2.inc

A SA:MP UI library for rendering progress bars used to visualise all manner of data from health to a countdown timer.

Library originally written by Flávio Toribio, Now maintained by Southclaws in version 2+ with new features.

Bars 1

Bars 2

Bars 3

Installation

Simply install to your project:

sampctl package install Southclaws/progress2

Include in your code and begin using the library:

#include <progress2>

Usage

Constants

  • MAX_PLAYER_BARS:
    • Defaults to the textdraw limit divided by 3.
  • INVALID_PLAYER_BAR_VALUE:
    • Invalid return value for interface functions.
  • INVALID_PLAYER_BAR_ID:
    • Invalid bar ID value.
  • BAR_DIRECTION_RIGHT:
    • Bar direction left-to-right
  • BAR_DIRECTION_LEFT:
    • Bar direction right-to-left
  • BAR_DIRECTION_UP:
    • Bar direction bottom to top
  • BAR_DIRECTION_DOWN:
    • Bar direction top to bottom

Functions

  • PlayerBar:CreatePlayerProgressBar(playerid, Float:x, Float:y, Float:width = 55.5, Float:height = 3.2, colour, Float:max = 100.0, direction = BAR_DIRECTION_RIGHT):
    • Creates a progress bar for a player.
  • DestroyPlayerProgressBar(playerid, PlayerBar:barid):
    • Destroys a player's progress bar.
  • ShowPlayerProgressBar(playerid, PlayerBar:barid):
    • Shows a player's progress bar to them.
  • HidePlayerProgressBar(playerid, PlayerBar:barid):
    • Hides a player's progress bar from them.
  • IsValidPlayerProgressBar(playerid, PlayerBar:barid):
    • Returns true if the input bar ID is valid and exists.
  • GetPlayerProgressBarPos(playerid, PlayerBar:barid, &Float:x, &Float:y):
    • Returns the on-screen position of the specified progress bar.
  • SetPlayerProgressBarPos(playerid, PlayerBar:barid, Float:x, Float:y):
    • Updates the position for a progress bar and re-renders it.
  • Float:GetPlayerProgressBarWidth(playerid, PlayerBar:barid):
    • Returns the width of a progress bar.
  • SetPlayerProgressBarWidth(playerid, PlayerBar:barid, Float:width):
    • Updates the width of a progress bar and re-renders it.
  • Float:GetPlayerProgressBarHeight(playerid, PlayerBar:barid):
    • Returns the height of a progress bar.
  • SetPlayerProgressBarHeight(playerid, PlayerBar:barid, Float:height):
    • Updates the height of a progress bar and re-renders it.
  • GetPlayerProgressBarColour(playerid, PlayerBar:barid):
    • Returns the colour of a progress bar.
  • SetPlayerProgressBarColour(playerid, PlayerBar:barid, colour):
    • Sets the colour of a progress bar.
  • Float:GetPlayerProgressBarMaxValue(playerid, PlayerBar:barid):
    • Returns the maximum value of a progress bar.
  • SetPlayerProgressBarMaxValue(playerid, PlayerBar:barid, Float:max):
    • Sets the maximum value that a progress bar represents.
  • Float:GetPlayerProgressBarValue(playerid, PlayerBar:barid):
    • Returns the value a progress bar represents.
  • SetPlayerProgressBarValue(playerid, PlayerBar:barid, Float:value):
    • Sets the value a progress bar represents.
  • GetPlayerProgressBarDirection(playerid, PlayerBar:barid):
    • Returns the direction of a progress bar.
  • SetPlayerProgressBarDirection(playerid, PlayerBar:barid, direction):
    • Updates the direction for a progress bar and re-renders it.

Internal

  • _RenderBar(playerid, barid):
    • Renders a valid bar on-screen using it's current properties. Called on creation and whenever position, width or height are updated.

Hooked

  • OnScriptInit:
    • When y_iterate is used, initialises iterators.
  • OnPlayerDisconnect:
    • To automatically destroy bars when a player disconnects.

Testing

To test, simply run the package:

sampctl package run

And connect to localhost:7777 to test.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].