Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

ProgressBar2 on high resolution - [FIXED]

Hi.

ID
d6ouivfilegovhg7bh9g
author
jr_junior's avatar

JR_Junior

@jr_junior


View profile
Copy link
  Report member
started
Oct 9, 2020
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
ProgressBar2 on high resolution - [FIXED]
jr_junior's avatar

JR_Junior

@jr_junior


View profile
Copy link
  Report member
• 5y
Pawn Scripting

ProgressBar2 on high resolution - [FIXED]

pawn

Hi.



I'm using the include https://github.com/Southclaws/progress2 and a small bug is happening.



I could create an issue post in the repository but it was archived by the owner.



On my old monitor the resolution was 1280x720 there was no problem.



My current monitor is 2560x1080 and the following bug is happening when the bar value is less than 5.5:





Here is the function to return the current progress value:

stock Float:_bar_percent(Float:x, Float:widthorheight, Float:max, Float:value, direction)

{

new Float:result;

switch(direction)

{

case BAR_DIRECTION_RIGHT:

{

result = ((x - 3.0)  (((((x - 2.0)  widthorheight) - x) / max) * value));

}

case BAR_DIRECTION_LEFT:?

{

result = ((x - 1.0) - (((((x  2.0) - widthorheight) - x) / max) * -value)) - 4.0;

}

case BAR_DIRECTION_UP:?

{

result = -((((((widthorheight / 10.0) - 0.45) * 1.02) / max) * value)  0.55);

}

case BAR_DIRECTION_DOWN:?

{

result = ((((((widthorheight / 10.0) - 0.45) * 1.02) / max) * value) - 0.55);

}

}

return result;

}





If I change the code

result = ((x - 3.0)  (((((x - 2.0)  widthorheight) - x) / max) * value));

to

result = (x  ((((x  widthorheight) - x) / max) * value));





Fix the problem but creates another:









FIXED THE PROBLEM

I made several corrections in the include and managed to solve my problem.





If anyone is interested I'm sharing:?https://github.com/Walter-Correa/progress2

0 likes0 replies

    Please sign up or log in to reply