Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Releases Libraries [Library] progress3D - Create progress bars in 3D space

 
  • 0 Vote(s) - 0 Average
Library progress3D - Create progress bars in 3D space
Manyula
Offline

Burgershot Member
Posts: 52
Threads: 5
Joined: Apr 2019
Reputation: 5
Location: Germany
#1
2019-04-14, 01:30 PM (This post was last modified: 2020-04-08, 06:26 PM by Manyula.)
progress3D

[Image: progress3-D.png]

After the 2D textdraw-based version of progress bars, here now comes the 3D version. This library lets you create progress bars in 3D space. It's basically just two overlapping 3D text labels, one being moved slightly to the right to fill in the gaps between the characters.

Repository

[Image: SAMPCTL-progress3D-03ef651]

Functions

Code:
Bar3D:CreateProgressBar3D(color, bool:borders, Float:x, Float:y, Float:z, Float:max_value, Float:init_value, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, areaid = -1, priority = 0)

Creates a 3D progress bar. Returns INVALID_3D_BAR if bar already exists.

Code:
HideProgressBar3D(Bar3D:barid)

Hide the specified 3D progress bar. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

Code:
ShowProgressBar3D(Bar3D:barid)

Shows the specified 3D progress bar. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

Code:
DestroyProgressBar3D(Bar3D:barid)

Destroys the specified progressbar. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

Code:
Float:GetProgressBar3DValue(Bar3D:barid)

Returns the current progress value. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

Code:
SetProgressBar3DValue(Bar3D_barid, Float:value)

Updates the value of the specified 3D progress bar. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

Code:
GetProgressBar3DColor(Bar3D_barid, color)

Returns the color of the specified 3D progress bar. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

Code:
SetProgressBar3DColor(Bar3D_barid, color)

Updates the color of the specified 3D progress bar. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

Code:
Float:GetProgressBar3DMaxValue(Bar3D:barid)

Returns the maximum value of the specified 3D progress bar. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

Code:
SetProgressBar3DMaxValue(Bar3D:barid, Float:max_value)

Updates the maximum value of the specified 3D progress bar. Returns 0 if the max value is smaller than the current value. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

Code:
IsValidProgressBar3D(Bar3D:barid)

Returns 1, if the specified 3D progress bar ID is valid and exists. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

---

Code:
 PlayerBar3D:CreatePlayerProgressBar3D(playerid, color, bool:borders, Float:x, Float:y, Float:z, Float:max_value, Float:init_value, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, areaid = -1, priority = 0)

Creates a player 3D progress bar. Returns INVALID_PLAYER_3D_BAR if bar already exists.

Code:
 HidePlayerProgressBar3D(playerid, PlayerBar3D:barid)

Hides the specified player 3D progress bar. Returns INVALID_PLAYER_3D_BAR if bar doesn't exist.

Code:
 ShowPlayerProgressBar3D(playerid, PlayerBar3D:barid)

Shows the specified player 3D progress bar. Returns INVALID_PLAYER_3D_BAR if bar doesn't exist.

Code:
 DestroyPlayerProgressBar3D(playerid, PlayerBar3D:barid)

Destroys a 3D player progress bar. Returns INVALID_PLAYER_3D_BAR if bar doesn't exist.

Code:
 Float:GetPlayerProgressBar3DValue(playerid, PlayerBar3D:barid)

Returns the current progress value. Returns INVALID_PLAYER_3D_BAR if bar doesn't exist.

Code:
 SetPlayerProgressBar3DValue(playerid, PlayerBar3D:barid, Float:value)

Updates the value of the specified player 3D progress bar. Returns 0 if value is greater than max value. Returns INVALID_PLAYER_3D_BAR if bar doesn't exist.

Code:
 GetPlayerProgressBar3DColor(playerid, PlayerBar3D:barid)

Returns the color of the specified player 3D progress bar. Returns INVALID_PLAYER_3D_BAR if bar doesn't exist.

Code:
 SetPlayerProgressBar3DColor(playerid, PlayerBar3D:barid, color)

Updates the color of the specified player 3D progress bar. Returns INVALID_GLOBAL_3D_BAR if bar doesn't exist.

Code:
 Float:GetPlayerProgressBar3DMaxValue(playerid, PlayerBar3D:barid)

Returns the maximum value of the specified player 3D progress bar. Returns INVALID_PLAYER_3D_BAR if bar doesn't exist.

Code:
 SetPlayerProgressBar3DMaxValue(playerid, PlayerBar3D:barid, Float:max_value)

Updates the maximum value of the specified player 3D progress bar. Returns 0 if the max value is smaller than the current value. Returns INVALID_PLAYER_3D_BAR if bar doesn't exist.

Code:
 IsValidPlayerProgressBar3D(playerid, PlayerBar3D:barid)

Returns 1, if the specified player 3D progress bar ID is valid and exists. Returns INVALID_PLAYER_3D_BAR if bar doesn't exist.
Mugsy Away

Desarollador
Posts: 171
Threads: 10
Joined: Apr 2019
Reputation: 0
Location: Spain
#2
2019-04-14, 01:32 PM
Wow, excelent.
[Image: oN9R4KR.gif]
SyS
Offline

Burgershot Member
Posts: 37
Threads: 5
Joined: Apr 2019
Reputation: 4
#3
2019-04-14, 01:34 PM
Interesting and nice idea
iSpark
Offline

Burgershot Member
Posts: 10
Threads: 2
Joined: Apr 2019
Reputation: 0
Location: India
#4
2019-04-14, 08:08 PM
I can see myself using this in the near future
Rocky Balboa
Offline

Scripter
Posts: 16
Threads: 0
Joined: Apr 2019
Reputation: 0
Location: Germany
#5
2019-04-14, 08:58 PM
Wow great job
TommyB
Offline

discord-connector #1 fan

Posts: 34
Threads: 3
Joined: Feb 2019
Reputation: 6
Location: Texas, USA
#6
2019-04-15, 01:10 PM
that's fucking rad, good work
Gravityfalls
Offline

Burgershot Member
Posts: 105
Threads: 7
Joined: Apr 2019
Reputation: 2
#7
2019-04-15, 11:15 PM
Amazing idea.
Markski
Offline

Burgershot Clerk

Posts: 127
Threads: 6
Joined: Apr 2019
Reputation: 5
Location: La Plata, Argentina
#8
2019-04-16, 08:29 PM
Very interesting idea, never thought of anything like this. Will have a play with it.
Website
Sasino97
Offline

Software Developer
Posts: 108
Threads: 16
Joined: Apr 2019
Reputation: 7
Location: Tampa, FL
#9
2019-06-21, 06:48 AM
You could add these progress bars on pickup-able items in a survival mode to display their damage 🤔
ByHgGlryz
Offline

Burgershot Member
Posts: 13
Threads: 0
Joined: Jul 2019
Reputation: 0
Location: Turkey, Sivas
#10
2019-11-12, 09:12 PM
Good Work! :)
[Image: UOLlY5.png] [font=Tahoma, Verdana, Arial, sans-serif][Image: 87390.png][/font][font=Tahoma, Verdana, Arial, sans-serif] [/font][font=Tahoma, Verdana, Arial, sans-serif][font=Tahoma, Verdana, Arial, sans-serif]Instagram Icon Click Image[/font][/font]
Manyula
Offline

Burgershot Member
Posts: 52
Threads: 5
Joined: Apr 2019
Reputation: 5
Location: Germany
#11
2020-03-09, 06:04 PM (This post was last modified: 2020-12-26, 11:41 PM by Manyula.)
Check out the newest version, it comes with borders ;)

[Image: progress3-D.png]
Metro
Offline

Burgershot Member
Posts: 37
Threads: 13
Joined: Apr 2019
Reputation: 1
#12
2020-03-10, 12:59 PM
(2020-03-09, 06:04 PM)Manyula Wrote: Check out the newest version, it comes with borders ;)

[Image: f5857f-1583701938.png]

image is broken
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode