Pie015 Posted November 5, 2010 Share Posted November 5, 2010 How do I make a meter like a speed-o-meter in a mission. Is there any way? Link to comment https://gtaforums.com/topic/462520-meter-mod/ Share on other sites More sharing options...
yair1221 Posted November 6, 2010 Share Posted November 6, 2010 you mean, like a speedometer with a texture, or just a bar... Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060192321 Share on other sites More sharing options...
Pie015 Posted November 6, 2010 Author Share Posted November 6, 2010 you mean, like a speedometer with a texture, or just a bar... Bar Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060192451 Share on other sites More sharing options...
yair1221 Posted November 6, 2010 Share Posted November 6, 2010 03C4: set_status_text $BEEFYBARON_SCORE type 0 GXT 'ZER2_43' // global_variable // Score ~1~04F7: status_text $1924 type 0 line 1 GXT 'BB_18' // global_variable // Score try one of these i think the "type" decides if it will be a bar or just a text...you get the point... Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060192464 Share on other sites More sharing options...
TheSiggi Posted November 6, 2010 Share Posted November 6, 2010 I hope you know which difficulties come with a bar, eh yair? Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060192581 Share on other sites More sharing options...
yair1221 Posted November 6, 2010 Share Posted November 6, 2010 absolutely not, ignorance is a bliss... i can create a bar using the "draw box" but then it will shrink to both sides Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060192585 Share on other sites More sharing options...
TheSiggi Posted November 6, 2010 Share Posted November 6, 2010 (edited) absolutely not, ignorance is a bliss...i can create a bar using the "draw box" but then it will shrink to both sides What the bloody hell are you talking about, boy?? You have to devide the cars max speed by 100 and store the result and then devide the max speed through this again since the status bar can only work with an interval of the values between 0-100 (>% ever heared of it?) Furthermore "draw box" is neither a valid scm or any other scripting/programming language command of the available hooks Edited November 6, 2010 by The_Siggi Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060192590 Share on other sites More sharing options...
Bennington Posted November 6, 2010 Share Posted November 6, 2010 (edited) The bar of my Vehicle Jump Mod works with that opcode: 0007: 1@ = 0.15 0004: $2657 = 18 04F7: status_text $2657 type 1 line 1 GXT '' // global_variable 059C: enable_status_text $2657 flashing 0 // global_variable 0002: jump @CARJUMP_105 :CARJUMP_1050001: wait 0 ms 0087: 2@ = 1@ // (float) 0013: 2@ *= 125.0 0090: $2657 = float 2@ to_integer 00D6: if 0AB0: key_pressed 16 004D: jump_if_false @CARJUMP_188 00D6: if 0023: 0.8 > 1@ 004D: jump_if_false @CARJUMP_105 000B: 1@ += 0.01 0002: jump @CARJUMP_105 :CARJUMP_1880001: wait 0 ms 0151: remove_status_text $2657 1@ is the jump power, which, as longer as you hold the button (SHIFT), will be increased. The maximum is 0.8. The bar is filled with the value 100, but arrange that this value is an INTEGER one! So when 0.8 is the max power, we have to "convert" it to the int value 100, 0013: 2@ *= 125.0 0090: $2657 = float 2@ to_integer do that. Sorry, I´m wandering There´s just a lil problem with that opcode, it only works with global variables. I chose one which isn´t used by the game. But with that subject, I have three questions: 1. What´s the difference between 04F7 and 03C4? 2. Can that draw boxes used in any way to make bars? 3. This one does refer to subject indirectly: Is there an way to get the max health of a car? Need that for a Damage Bar mod Edited November 6, 2010 by Bennington Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060192952 Share on other sites More sharing options...
TheSiggi Posted November 6, 2010 Share Posted November 6, 2010 1st There doesn't have to be a differnece R* North has several opcodes twice but if you want to figure out you cann look through the main.scm 2nd Which f*cking draw box???? Can someone tell me what the hell is that meant to mean? 3rd I made a script which displays the current cars health as number (needed it for some testing)...its somewhere in this section but idk whether it deals with random cars only or whether it can handle with cars which have more health than default ones Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060192967 Share on other sites More sharing options...
yair1221 Posted November 6, 2010 Share Posted November 6, 2010 1.i think its a different type of status text, or simply another opcode to do the same 2.yeah, but the problem is, he size is set from the center, not from one end so it shrinks towards the center. i hope you are getting any of this... 3.there is no max health, every car can have 1000000000000000000000000000000000000000000 health but there is a default amount of health you can make a code to know the exact value something between 1000 and 2000 edit: DAMN IT, siggi got it before me, i write fuc*ing slow Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060192974 Share on other sites More sharing options...
Bennington Posted November 6, 2010 Share Posted November 6, 2010 (edited) LOL? Opcode 038F?? I found out how to make bar with it by the way, it´s quite simple: Just draw a box with a certain length (pity that there´s no way to make it transparent), and on it another box with a color of your choice and a length with a proportion to the first box, how your current value to the max value. You have to put it in a loop to keep it working. Edited November 6, 2010 by Bennington Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060193041 Share on other sites More sharing options...
Silent Posted November 6, 2010 Share Posted November 6, 2010 3.there is no max health, every car can have 1000000000000000000000000000000000000000000 health Lol, buffer overrun. 2.yeah, but the problem is, he size is set from the center, not from one end Using simple math can solve this problem Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060193355 Share on other sites More sharing options...
J16D Posted November 6, 2010 Share Posted November 6, 2010 If you got problems with the drawbox opcode, I already did a status bar with local vars using that opcode you can see it here: http://www.gtaforums.com/index.php?showtop...st&p=1060156774 Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060193377 Share on other sites More sharing options...
Deji Posted November 7, 2010 Share Posted November 7, 2010 The math SilentPL is referring to: XPosition + (Width / 2) Figure that out and I will give you all invitations to my birthday party and my "We hate yair" club, I am forming. We will all drink milk and cookies while listening to Beyonce and Rhianna and talk about the latest in yair's n00bish acts. But anyway.. we're all replying arguing over which answer works best.. Yet the original author hasn't even confirmed whether he's found a solution from them yet... Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060193566 Share on other sites More sharing options...
Bennington Posted November 7, 2010 Share Posted November 7, 2010 If you got problems with the drawbox opcode, I already did a status bar with local vars using that opcode you can see it here: http://www.gtaforums.com/index.php?showtop...st&p=1060156774 Yeah, that´s exactly what I meant! Link to comment https://gtaforums.com/topic/462520-meter-mod/#findComment-1060194924 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now