Jump to content

Brokenfish's Speedometer


Recommended Posts

spaceeinstein

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 by spaceeinstein
Link to comment
https://gtaforums.com/topic/203448-brokenfishs-speedometer/
Share on other sites

ThAtSgOtTaHuRt

sweet, just what I was looking for. good work. rah.gif

 

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 by ThAtSgOtTaHuRt
Link to comment
https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2990741
Share on other sites

spaceeinstein
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 by spaceeinstein
Link to comment
https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2992511
Share on other sites

spaceeinstein

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 by spaceeinstein
Link to comment
https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-2997038
Share on other sites

Trouble shooting needed smile.gif

 

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

spaceeinstein

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 by spaceeinstein
Link to comment
https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3012794
Share on other sites

No problem Space. Thanks for the update. I edited it to reflect KPH

 

 

0011: @1 *=  3.621024;; floating-point values

008C: @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

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

  • 1 month later...
Private_Paula

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 by Private_Paula
Link to comment
https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3154925
Share on other sites

  • 7 months later...

 

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... rah.gif

Edited by Kremit
Link to comment
https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3622013
Share on other sites

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.... confused.gif

Link to comment
https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3622039
Share on other sites

  • 2 weeks later...

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. confused.gif

Link to comment
https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3650494
Share on other sites

  • 3 weeks later...

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.......

 

user posted image

 

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 by stan101
Link to comment
https://gtaforums.com/topic/203448-brokenfishs-speedometer/#findComment-3680929
Share on other sites

Guest
This topic is now closed to further replies.
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.