Jump to content

[INCLUDE] progress3D - Create progress bars in 3D space


Arabu
 Share

Recommended Posts

progress3D.inc

progress3D.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 those gaps between the characters. Have fun with it!

Repository
sampctl-progress3D-2f2f2f.svg?style=for-

Functions

  • Bar3D:CreateProgressBar3D(layout, fill_color, background_color, Float:max_value, Float:init_value, Float:x, Float:y, Float:z, 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, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1)

Creates a 3D progress bar.

  • DestroyProgressBar3D(Bar3D:barid)

Destroys a 3D progress bar.

  • GetProgressBar3DValue(Bar3D:barid)

Returns the current progress value.

  • SetProgressBar3DValue(Bar3D:barid, Float:value)

Updates the value of the specified 3D progress bar.

  • GetProgressBar3DFillColor(Bar3D:barid)

Returns the fill color of the specified 3D progress bar.

  • SetProgressBar3DFillColor(Bar3D:barid, fill_color)

Updates the fill color of the specified 3D progress bar.

  • GetProgressBar3DBackgroundColor(Bar3D:barid)

Returns the background color of the specified 3D progress bar.

  • SetProgressBar3DBackgroundColor(Bar3D:barid, background_color)

Updates the background color of the specified 3D progress bar.

  • GetProgressBar3DMaxValue(Bar3D:barid)

Returns the maximum value of the specified 3D progress bar.

  • SetProgressBar3DMaxValue(Bar3D:barid, Float:max_value)

Updates the maximum value of the specified 3D progress bar.

  • GetProgressBar3DLayout(Bar3D:barid)

Returns the layout of the specified 3D progress bar.

  • SetProgressBar3DLayout(Bar3D:barid, layout)

Updates the layout of the specified 3D progress bar.

  • IsValidProgressBar3D(Bar3D:barid)

Returns true, if the specified 3D progress bar ID is valid and exists.


Changelog

v1.3

  • Added a new parameter layout with three new bar layout options
  1. BAR_3D_LAYOUT_THIN
  2. BAR_3D_LAYOUT_NORMAL
  3. BAR_3D_LAYOUT_THICK
  • Added GetProgressBar3DLayout(Bar3D:barid) and SetProgressBar3DLayout(Bar3D:barid, layout)


v1.2.1

  • Fixed getter functions (forgot to add "_:" to the returned value)


v1.2

  • Added the parameter Float:max_value to Bar3D:CreateProgressBar3D(...)
  • Added GetProgressBar3DMaxValue(Bar3D:barid)
  • Added SetProgressBar3DMaxValue(Bar3D:barid, Float:max_value)
  • Updated the testing script


v1.1

  • Code optimizations
  • Internal check if value ranges from 0 to 100.


v1.0

  • Initial release
Edited by Marlboro

 

vldgIri.png

YouTube : Click Redirect Channel

Discord : Arabu#9330

Canal Discord : Click To Join

Facebook : Click Facebook

Instagram : Click Instagram

Skype : Mita.Official

Așteptăm jucatorii de PUBG Mobile și pe serverul de Discord PUBG Mobile România!

Join PUBGM România

Respectă și vei fi respectat !

 

 

 

 

Link to comment
Share on other sites

Acum 1 oră, Dennis12 a spus:

Acu' poate fac si eu progress bar ca a lu @KsenonAdv fara sa se chinuie 

????????

 

vldgIri.png

YouTube : Click Redirect Channel

Discord : Arabu#9330

Canal Discord : Click To Join

Facebook : Click Facebook

Instagram : Click Instagram

Skype : Mita.Official

Așteptăm jucatorii de PUBG Mobile și pe serverul de Discord PUBG Mobile România!

Join PUBGM România

Respectă și vei fi respectat !

 

 

 

 

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...