spaceeinstein Posted July 15, 2005 Share Posted July 15, 2005 (edited) CONVERTED FOR SAN ANDREAS! Created by Brokenfish for Vice City. Converted by spaceeinstein for San Andreas. This is a script mod that displays the speed of any vehicles in about miles per hour. Please download Barton's mission builder using Craig's link. You have to download Hammer89's GXT editor. Find the GXT string "HOSP_1". Edit the text to "MPH". Save the GXT. It should display the speed in numbers next to the MPH. 004F: create_thread ££SPEED------------:SPEED0001: wait 50 ms00D6: if 000DF: actor $PLAYER_ACTOR driving004D: jump_if_false ££SPEEDLAST03C0: @0 = actor $PLAYER_ACTOR car00D6: if 000DB: actor $PLAYER_ACTOR in_car @0004D: jump_if_false ££SPEED02E3: @1 = car @0 speed0011: @1 *= 2.25;; floating-point values008C: @1 = float_to_integer @10086: $SPED = @1;; floating-point values only04F7: status_text $SPED 0 line 4 'HOSP_1';; MPH0002: jump ££SPEED:SPEEDLAST0001: wait 250 ms0151: remove_status_text $SPED0002: jump ££SPEED Edited September 1, 2005 by spaceeinstein Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/ Share on other sites More sharing options...
ThAtSgOtTaHuRt Posted July 15, 2005 Share Posted July 15, 2005 (edited) sweet, just what I was looking for. good work. although the NRG tops out at 80MPH on your speedo and the HYREA tops out at 120MPH. can ya boost the number up a bit to make it more realistic? - like multiply it by 2.25 then NRG will top out at 180 (sounds about right) but then again after I did that I end up going 40MPH when the bike is rolling at a jogging pace. what to do what to do? Edited July 15, 2005 by ThAtSgOtTaHuRt Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2990741 Share on other sites More sharing options...
spaceeinstein Posted July 15, 2005 Author Share Posted July 15, 2005 (edited) It's like that, somehow. It does that in Vice City for the Skimmer only but somehow in San An, it does that in almost any vehicles. I changed the value to 2.0 (original one). Edited July 15, 2005 by spaceeinstein Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2992511 Share on other sites More sharing options...
sighko Posted July 15, 2005 Share Posted July 15, 2005 works PERFECT been waiting for a digital speedo to put in my script...BIG UPS! Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2992563 Share on other sites More sharing options...
RainingAcid Posted July 16, 2005 Share Posted July 16, 2005 Is locks up when I try to add it to SA-Back to reality. Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2993035 Share on other sites More sharing options...
spaceeinstein Posted July 16, 2005 Author Share Posted July 16, 2005 The size limit for the first four segments is 2MB (or 200,00 something), so if you go over that, the game crashes. Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2993368 Share on other sites More sharing options...
yfbcjw Posted July 16, 2005 Share Posted July 16, 2005 It worked when i added it to SA - back to reality, although it doesnt always show because of the petrol bar and when it does the petrol bar doesnt Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2994557 Share on other sites More sharing options...
The_Grudge Posted July 17, 2005 Share Posted July 17, 2005 Any way to make this display KPH? Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2997012 Share on other sites More sharing options...
spaceeinstein Posted July 17, 2005 Author Share Posted July 17, 2005 (edited) Change 0011: $SPED2 *= 2.0;; floating-point values. to this 0011: $SPED2 *= 4.0 ;; floating-point values O yea, I will update the code to include local instead of global variables later on. Edited July 17, 2005 by spaceeinstein Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2997038 Share on other sites More sharing options...
The_Grudge Posted July 17, 2005 Share Posted July 17, 2005 Change 0011: $SPED2 *= 2.0;; floating-point values.to this 0011: $SPED2 *= 4.0 ;; floating-point values O yea, I will update the code to include local instead of global variables later on. Thanks, but I already figured that out. Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2997209 Share on other sites More sharing options...
spaceeinstein Posted July 17, 2005 Author Share Posted July 17, 2005 The speedometer is updated so it can have the same speed as the other speedometer. Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2997219 Share on other sites More sharing options...
Alick Posted July 17, 2005 Share Posted July 17, 2005 cool looks great in game Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2997314 Share on other sites More sharing options...
ripple Posted July 21, 2005 Share Posted July 21, 2005 Trouble shooting needed I tried to combine this with Greg's SA Opened Up mod. The speedometer works, but.....when I start a new game, I get that big text message on screen which says "When your health reaches 0 you will be sent to the hospital" (or something like that), but the text message does not dissappear--it just stays there. Any ideas? Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3009339 Share on other sites More sharing options...
spaceeinstein Posted July 22, 2005 Author Share Posted July 22, 2005 (edited) So terribly sorry about ignoring this. You have to download a GXT Editor and find "HOSP_1". Edit the text to "MPH". I will update first post later today. Ok post updated. Anyone who installed this mod should install it again since I updated the code also. Edited July 22, 2005 by spaceeinstein Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3012794 Share on other sites More sharing options...
ripple Posted July 22, 2005 Share Posted July 22, 2005 No problem Space. Thanks for the update. I edited it to reflect KPH 0011: @1 *= 3.621024;; floating-point values008C: @1 = float_to_integer @1 0086: $SPED = @1 ;; floating-point values only 04F7: status_text $SPED 0 line 4 'HOSP_1';; KPH Is this right? Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3012883 Share on other sites More sharing options...
spaceeinstein Posted July 23, 2005 Author Share Posted July 23, 2005 (edited) Change to 4.0 Edited July 23, 2005 by spaceeinstein Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3014360 Share on other sites More sharing options...
ripple Posted July 23, 2005 Share Posted July 23, 2005 Thanks Space. The reason I was asking was because intially I changed it to 4 as per your previous instructions and....well, CJ was riding on the bicycle and doing 80 kph just cruising, which I thought was fast because I never went that fast on my bike Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3014616 Share on other sites More sharing options...
spaceeinstein Posted July 24, 2005 Author Share Posted July 24, 2005 Yea, I know. GTA is a whacky place. It's normal for the bike to go that fast. Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3016277 Share on other sites More sharing options...
akboy Posted July 24, 2005 Share Posted July 24, 2005 Note: 1 kph = 1,61 mph. But if your multiplier for mile is 2.0, the multiplier for kph is 3.22 (2.0 * 1.61). In the handling.cfg, Hydra max speed is 200 kph (I take the hydra because he can take this max speed). Without multiplier, the game draws 75. -> 200/75 = 2.67 (kph multiplier) -> 2.67/1.61 = 1.66 (mph multiplier) What do you think about that? Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3017041 Share on other sites More sharing options...
spaceeinstein Posted July 24, 2005 Author Share Posted July 24, 2005 The speed I have now is based on Spooky's speedometer. Its max speed for the Hydra is 168MPH so I synced it with it. Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3017290 Share on other sites More sharing options...
bear052303 Posted August 27, 2005 Share Posted August 27, 2005 i got this error message: ERROR: Parameter 1 not set. Command: 004D: JUMP_IF_FALSE ’’SPEEDLAST please help, thanks Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3139183 Share on other sites More sharing options...
Private_Paula Posted September 1, 2005 Share Posted September 1, 2005 (edited) it seems to work, but i can´t find anything even close to "HOPS_1" in the GXT file. (or the text it shows in game) can you please tell me where to find it (is it a table, entry or value)? i´m using sagxtedit if this is helping. EDIT: forget it, i found it. Edited September 2, 2005 by Private_Paula Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3154925 Share on other sites More sharing options...
Kremit Posted April 5, 2006 Share Posted April 5, 2006 (edited) Note: 1 kph = 1,61 mph. I think ya got that backwards... 1 kph = 0.621371192 mph... or... 1 mph = 1.609344 kph So, here's a chart of conversion multipliers to one's disposal.. MPH || KPH 1.0 || 1.609344 1.25 || 2.01168 1.5 || 2.414016 1.75 || 2.816352 2.0 || 3.218688 2.25 || 3.621024 2.5 || 4.02336 2.75 || 4.425696 3.0 || 4.828032 3.25 || 5.230368 3.5 || 5.632704 3.75 || 6.03504 4.0 || 6.437376 4.25 || 6.839712 4.5 || 7.242048 4.75 || 7.644384 5.0 || 8.04672 No more guesstimation or approximations... Edited April 5, 2006 by Kremit Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3622013 Share on other sites More sharing options...
Kremit Posted April 5, 2006 Share Posted April 5, 2006 i got this error message: ERROR: Parameter 1 not set. Command: 004D: JUMP_IF_FALSE ’’SPEEDLAST please help, thanks can only take a couple guesses here as this isn't my code of knowledge... However, I would have to guess one of the following may be your issue... A) You do not have a Speedlast section. :SPEEDLAST0001: wait 250 ms0151: remove_status_text $SPED0002: jump ££SPEED B) You do not have a valid if statement, or perhaps no action after the if statement. 00D6: if 000DF: actor $PLAYER_ACTOR driving C) You do not have 0 defined. 03C0: @0 = actor $PLAYER_ACTOR car Basically, it's saying: "If the player character is in a car, then the character's action is driving.. Otherwise, he's on foot." Now if he's driving, it continues downward to calculate his speed. If not, it kicks over to Speedlast section and removes the mph block. Wish I could help you more, but I'm not sure what your code looks like and as I've said, this isn't one of my stronger languages.... Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3622039 Share on other sites More sharing options...
the_king Posted April 18, 2006 Share Posted April 18, 2006 If this mod was converted from vc to san andreas, does anyone happen to know where I can find the VC version? Kremit, I dont think bear052303 is pursuing that error question any more, it's been a few months since this topic has had any replies. Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3650494 Share on other sites More sharing options...
stan101 Posted April 21, 2006 Share Posted April 21, 2006 Does this work for Vice City? Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3656896 Share on other sites More sharing options...
Martin12345678910 Posted May 6, 2006 Share Posted May 6, 2006 any pics for it? Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3679816 Share on other sites More sharing options...
stan101 Posted May 7, 2006 Share Posted May 7, 2006 (edited) Ok, i just got GTA SA and i'm modding, it works, but i need to know the default speed multi-plier in mph... in numbers like: 2.24? this is just an example in gta vc, still working on sa....... see the the speedometer is differet than the main.scm code.. so how do we get the main.scm to work in the speedometer.. i want to convert it myself. Edited May 7, 2006 by stan101 Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3680929 Share on other sites More sharing options...
Martin12345678910 Posted May 7, 2006 Share Posted May 7, 2006 looks cool can some one post a file for it so you dont have to do this to get it to work as i tried to get it to work and i cant open the main.scm file and if someone posts it can they make it in KPH and MPH please Thanks Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3681186 Share on other sites More sharing options...
ms.cooldude Posted May 7, 2006 Share Posted May 7, 2006 I can see why this speedometer is much better than the ones you add to the SA directory cos they slow my pc down by a bit Link to comment https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3681385 Share on other sites More sharing options...
Recommended Posts