ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 2132

Fix design

by carlos_20 - 04-01-2020 - 10:26 PM
#1
Good I have a failure that, even though I try not to fix it, is to go online and the player info blinks

if (NewDesign)
{
GRAPHICS::DRAW_RECT(0.5805f, 0.1763f, 0.1846f, 0.0627f, 0, 255, 255, 255);//Banner
GRAPHICS::DRAW_RECT(0.5805f, 0.4419f, 0.1842f, 0.4680f, backgroundRed, backgroundGreen, backgroundBlue, backgroundOpacity);//background
DrawSprite("timerbars", "lhs_bg", 0.5813f, 0.1763f, 0.1847f, 0.0627f, 0, 171, 0, 255, 255);//Color Right menu
GRAPHICS::DRAW_RECT(0.4895f, 0.4428f, 0.0016f, 0.4681f, 0, 255, 255, 255);//left
GRAPHICS::DRAW_RECT(0.6720f, 0.4428f, 0.0016f, 0.4681f, 171, 0, 255, 255);//right
GRAPHICS::DRAW_RECT(0.5810f, 0.6771f, 0.1846f, 0.00046f, 0, 255, 255, 255);//down
DrawSprite("timerbars", "lhs_bg", 0.5813f, 0.6771f, 0.1846f, 0.00046f, 0, 171, 0, 255, 255);//Color Right menu
}
else
{
GRAPHICS::DRAW_RECT(0.5805f, 0.4419f, 0.1842f, 0.4680f, 16, 16, 16, 100);//background
GRAPHICS::DRAW_RECT(0.5805f, 0.1763f, 0.1846f, 0.0627f, bannerRectRed, bannerRectGreen, bannerRectBlue, bannerRectOpacity);//Banner
GRAPHICS::DRAW_RECT(0.4895f, 0.4428f, 0.0016f, 0.4681f, bannerRectRed, bannerRectGreen, bannerRectBlue, bannerRectOpacity);//left
GRAPHICS::DRAW_RECT(0.6720f, 0.4428f, 0.0016f, 0.4681f, bannerRectRed, bannerRectGreen, bannerRectBlue, bannerRectOpacity);//right
GRAPHICS::DRAW_RECT(0.5810f, 0.6771f, 0.1846f, 0.00046f, bannerRectRed, bannerRectGreen, bannerRectBlue, bannerRectOpacity);//down
}
Player ui_slectedPlayer = selectedPlayer;
Player ui_currentPlayer = currentOption - 1;
Player OnlinePlayer = PLAYER::GET_PLAYER_PED(isSelected ? ui_slectedPlayer : ui_currentPlayer);
Vector3 Coords = ENTITY::GET_ENTITY_COORDS(OnlinePlayer, 1);
drawText(PLAYER::GET_PLAYER_NAME(isSelected ? ui_slectedPlayer : ui_currentPlayer), 6, 0.5430f, 0.1530f, 0.7f, 0.7f, 100, 100, 100, 255, false);
Reply
#2
Because it’s looping faster than it should.
Reply
#3
How can I solve it then?
Reply
#4
add timer on your hook
Reply
#5
Or don’t use booleans at all, lol. The way you have it is nasty.
Reply
#6
(04-02-2020 - 12:22 AM)carlos_20 Wrote: How can I solve it then?
are your trying to do 2 different info boxes in your menu? do this instead there is way better ways to do this but this is better then what you have already
Code:
int design;
if (Design == 0) {
    GRAPHICS::DRAW_RECT(0.5805f, 0.1763f, 0.1846f, 0.0627f, 0, 255, 255, 255);//Banner
GRAPHICS::DRAW_RECT(0.5805f, 0.4419f, 0.1842f, 0.4680f, backgroundRed, backgroundGreen, backgroundBlue, backgroundOpacity);//background
DrawSprite("timerbars", "lhs_bg", 0.5813f, 0.1763f, 0.1847f, 0.0627f, 0, 171, 0, 255, 255);//Color Right menu
GRAPHICS::DRAW_RECT(0.4895f, 0.4428f, 0.0016f, 0.4681f, 0, 255, 255, 255);//left
GRAPHICS::DRAW_RECT(0.6720f, 0.4428f, 0.0016f, 0.4681f, 171, 0, 255, 255);//right
GRAPHICS::DRAW_RECT(0.5810f, 0.6771f, 0.1846f, 0.00046f, 0, 255, 255, 255);//down
DrawSprite("timerbars", "lhs_bg", 0.5813f, 0.6771f, 0.1846f, 0.00046f, 0, 171, 0, 255, 255);//Color Right menu
}
else if (Design == 1) {
GRAPHICS::DRAW_RECT(0.5805f, 0.4419f, 0.1842f, 0.4680f, 16, 16, 16, 100);//background
GRAPHICS::DRAW_RECT(0.5805f, 0.1763f, 0.1846f, 0.0627f, bannerRectRed, bannerRectGreen, bannerRectBlue, bannerRectOpacity);//Banner
GRAPHICS::DRAW_RECT(0.4895f, 0.4428f, 0.0016f, 0.4681f, bannerRectRed, bannerRectGreen, bannerRectBlue, bannerRectOpacity);//left
GRAPHICS::DRAW_RECT(0.6720f, 0.4428f, 0.0016f, 0.4681f, bannerRectRed, bannerRectGreen, bannerRectBlue, bannerRectOpacity);//right
GRAPHICS::DRAW_RECT(0.5810f, 0.6771f, 0.1846f, 0.00046f, bannerRectRed, bannerRectGreen, bannerRectBlue, bannerRectOpacity);//down
}
Reply
#7
thank you very much i will try to see if i fix it
Reply
#8
ok good luck hope you fix it
Reply
#9
bro re do it that will never work m8
This account is currently banned
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.
(Spamming weird links in here)
Reply
#10
Call it as void and could be that ur menu hook to slow or call same place ur whole ui
Reply

Users browsing: 2 Guest(s)