You are viewing our Forum Archives. To view or take place in current topics click here.
Need help with scrolling news bar | C++
Posted:
Need help with scrolling news bar | C++Posted:
Status: Offline
Joined: Apr 08, 201311Year Member
Posts: 8
Reputation Power: 0
Status: Offline
Joined: Apr 08, 201311Year Member
Posts: 8
Reputation Power: 0
So I have been having some troubles when actually calling the newsbar function. All goes well in my menu until I choose to enable the news bar and everything else freezes and I no longer have control of the rest of the menu.
If you could help out to figure the problem that would be great!
The current code is:
If you could help out to figure the problem that would be great!
The current code is:
if(NewsBar == 0)
{
NewsBar=1;
setIcon(nbshader[i], 1000, 40, 355, 400, 1, 0, 0, 0, 210);
setText(nbitems[i], "^7Welcome To My Menu ^3|| ^1Coded By xXxXx ^3|| ^5Hope That you Enjoy^3||^1<3 errrbody^3||^7Enjoy! :)", 6, 20, 355, 400, 1, 0x5);
for (int p = 355; p > 0; )
{
p = p - 0.00000005;
ElemMove(nbitems[i], p, 400);
if (p < 20)
{
p = 355;
}
Sleep(10);
}
}
#2. Posted:
Status: Offline
Joined: Sep 06, 201014Year Member
Posts: 1,069
Reputation Power: 47
Status: Offline
Joined: Sep 06, 201014Year Member
Posts: 1,069
Reputation Power: 47
Because the newsbar loops infinitely and it is called within the same thread as your menu, all it can do is run through your newsbar code over and over. So to get it to work you would have to thread it so the console could execute both it and the menu at the same time.
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Apr 08, 201311Year Member
Posts: 8
Reputation Power: 0
Status: Offline
Joined: Apr 08, 201311Year Member
Posts: 8
Reputation Power: 0
M0D1F13D wrote Because the newsbar loops infinitely and it is called within the same thread as your menu, all it can do is run through your newsbar code over and over. So to get it to work you would have to thread it so the console could execute both it and the menu at the same time.
Should of known.. Thanks man!
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Aug 31, 201212Year Member
Posts: 1,553
Reputation Power: 65
Status: Offline
Joined: Aug 31, 201212Year Member
Posts: 1,553
Reputation Power: 65
M0D1F13D wrote Because the newsbar loops infinitely and it is called within the same thread as your menu, all it can do is run through your newsbar code over and over. So to get it to work you would have to thread it so the console could execute both it and the menu at the same time.
To go along with what he said, I would suggest adding in
if (NewsBar == 1)
{
if (Dvar_GetBool == 1)
{
whatever your code is
}
}
I use that in my menus, as it makes it only run the newsbar when you are in game. However, that is if you want the newsbar from the start. If you know what you are doing you can figure it out.
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Apr 09, 201311Year Member
Posts: 17
Reputation Power: 0
Status: Offline
Joined: Apr 09, 201311Year Member
Posts: 17
Reputation Power: 0
Thread XM = new Thread(newsbar);
XM.Start();
put that into the button pressed code
- 0useful
- 0not useful
#6. Posted:
Status: Offline
Joined: Apr 13, 201212Year Member
Posts: 628
Reputation Power: 36
XeXLooney wroteThread XM = new Thread(newsbar);
XM.Start();
put that into the button pressed code
Whooaaaaa skids get your Languages corect ....
Buttons is C# and if you are looking for newsbar for XRPC then these kids
Are correct , if you want it for C++ it is different
Languages ::
C# : XRPC tools and JTAGRPC Tools - yes this is the one with buttons
C++ : makes .dll's for cod - yes this is the one which had no buttons
- 0useful
- 0not useful
#7. Posted:
Status: Offline
Joined: Mar 08, 201311Year Member
Posts: 56
Reputation Power: 2
Status: Offline
Joined: Mar 08, 201311Year Member
Posts: 56
Reputation Power: 2
TLH-Hugh wroteXeXLooney wroteThread XM = new Thread(newsbar);
XM.Start();
put that into the button pressed code
Whooaaaaa skids get your Languages corect ....
Buttons is C# and if you are looking for newsbar for XRPC then these kids
Are correct , if you want it for C++ it is different
Languages ::
C# : XRPC tools and JTAGRPC Tools - yes this is the one with buttons
C++ : makes .dll's for cod - yes this is the one which had no buttons
Can you help me make a news bar for mw3? I'll put your name in it. Its for C#
- 0useful
- 0not useful
#8. Posted:
Status: Offline
Joined: Apr 09, 201311Year Member
Posts: 17
Reputation Power: 0
Status: Offline
Joined: Apr 09, 201311Year Member
Posts: 17
Reputation Power: 0
TLH-Hugh wroteXeXLooney wroteThread XM = new Thread(newsbar);
XM.Start();
put that into the button pressed code
Whooaaaaa skids get your Languages corect ....
Buttons is C# and if you are looking for newsbar for XRPC then these kids
Are correct , if you want it for C++ it is different
Languages ::
C# : XRPC tools and JTAGRPC Tools - yes this is the one with buttons
C++ : makes .dll's for cod - yes this is the one which had no buttons
My code is in C# though? I know my languages. I use C# to make my own tool and that is the code I use to activate my newsbar
EDIT: Just noticed the post says C++ sorry I'm tired
Last edited by XeXLooney ; edited 1 time in total
- 0useful
- 0not useful
#9. Posted:
Status: Offline
Joined: Apr 13, 201212Year Member
Posts: 628
Reputation Power: 36
XeXLooney wroteTLH-Hugh wroteXeXLooney wroteThread XM = new Thread(newsbar);
XM.Start();
put that into the button pressed code
Whooaaaaa skids get your Languages corect ....
Buttons is C# and if you are looking for newsbar for XRPC then these kids
Are correct , if you want it for C++ it is different
Languages ::
C# : XRPC tools and JTAGRPC Tools - yes this is the one with buttons
C++ : makes .dll's for cod - yes this is the one which had no buttons
My code is in C# though? I know my languages. I use C# to make my own tool and that is the code I use to activate my newsbar
I know I was talking about the original post, he was asking for C++
I wasn't accusing you ..
- 0useful
- 0not useful
#10. Posted:
Status: Offline
Joined: Apr 09, 201311Year Member
Posts: 17
Reputation Power: 0
Status: Offline
Joined: Apr 09, 201311Year Member
Posts: 17
Reputation Power: 0
TLH-Hugh wroteXeXLooney wroteTLH-Hugh wroteXeXLooney wroteThread XM = new Thread(newsbar);
XM.Start();
put that into the button pressed code
Whooaaaaa skids get your Languages corect ....
Buttons is C# and if you are looking for newsbar for XRPC then these kids
Are correct , if you want it for C++ it is different
Languages ::
C# : XRPC tools and JTAGRPC Tools - yes this is the one with buttons
C++ : makes .dll's for cod - yes this is the one which had no buttons
My code is in C# though? I know my languages. I use C# to make my own tool and that is the code I use to activate my newsbar
I know I was talking about the original post, he was asking for C++
I wasn't accusing you ..
Oh okay so I was right then It's okay I'm really tired atm so I don't understand much
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.