Skip to content
GiampaoloFalqui edited this page Sep 20, 2014 · 1 revision

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.

  • Float: x = x coordinate of the Progress Bar.
  • Float: y = y coordinate of the Progress Bar.
  • Float: width = width of the Progress Bar.
  • Float: height = height of the Progress Bar.
  • color = color of the Progress Bar.
  • Float: max = maximum completion percentage value of the Progress Bar.
  • direction = completion moving direction of the Progress Bar.

DestroyPlayerProgressBar(playerid, PlayerBar: barid)

Destroys a player's progress bar.

  • playerid = playerid of whom should the Progress Bar be deleted.
  • PlayerBar: barid = Progress Bar id to delete.

HidePlayerProgressBar(playerid, PlayerBar: barid)

Hides a player's progress bar from them.

  • playerid = playerid of whom should the Progress Bar be hidden.
  • PlayerBar: barid = Progress Bar id to hide.

IsValidPlayerProgressBar(playerid, PlayerBar: barid)

Returns true if the input bar ID is valid and exists.

  • playerid = playerid of whom should the Progress Bar be checked.
  • PlayerBar: barid = Progress Bar id to check.

GetPlayerProgressBarPos(playerid, PlayerBar: barid, &Float: x, &Float: y)

Returns the on-screen position of the specified progress bar.

  • playerid = playerid of whom is the Progress Bar.
  • PlayerBar: barid = Progress Bar id to take the coordinates information from.
  • &Float: x = reference variable of ProgressBar's X coordinate.
  • &Float: y = reference variable of ProgressBar's Y coordinate.

Float: GetPlayerProgressBarHeight(playerid, PlayerBar: barid)

Returns the height of a progress bar.

  • playerid = playerid of whom is the Progress Bar.
  • PlayerBar: barid = Progress Bar id to take the height information from.

GetPlayerProgressBarColour(playerid, PlayerBar: barid)

Returns the colour of a progress bar.

  • playerid = playerid of whom is the Progress Bar.
  • PlayerBar: barid = Progress Bar id to take the color information from.

SetPlayerProgressBarColour(playerid, PlayerBar: barid, colour)

Sets the colour of a progress bar.

  • playerid = playerid of whom is the Progress Bar.
  • PlayerBar: barid = Progress Bar id to set the color of.
  • color = new color of the Progress Bar.

Float: GetPlayerProgressBarMaxValue(playerid, PlayerBar: barid)

Returns the maximum value of a progress bar.

  • playerid = playerid of whom is the Progress Bar.
  • PlayerBar: barid = Progress Bar id to take the max completion percentage value information from.

SetPlayerProgressBarMaxValue(playerid, PlayerBar: barid, Float: max)

Sets the maximum value that a progress bar represents.

  • playerid = playerid of whom is the Progress Bar.
  • PlayerBar: barid = Progress Bar id to set the max completion percentage value of.
  • color = new max completion percentage value of the Progress Bar.

Float: GetPlayerProgressBarValue(playerid, PlayerBar: barid)

Returns the value a progress bar represents.

  • playerid = playerid of whom is the Progress Bar.
  • PlayerBar: barid = Progress Bar id to take the value information from.

SetPlayerProgressBarValue(playerid, PlayerBar: barid, Float: value)

Sets the value a progress bar represents.

  • playerid = playerid of whom is the Progress Bar.
  • PlayerBar: barid = Progress Bar id to set the value of.
  • color = new value of the Progress Bar.

GetPlayerProgressBarDirection(playerid, PlayerBar: barid)

Returns the direction of a progress bar.

  • playerid = playerid of whom is the Progress Bar.
  • PlayerBar: barid = Progress Bar id to take the completion moving direction information from.