HooThaFuck
Active member
- Joined
- Apr 18, 2015
- Messages
- 51
- Reaction score
- 0
I tried my self of course, my code is below. What I tried to do was enable custom speeds. What really happens is I drive backwards constantly and I can't change the speed limit. Key 73 is 'i', so I expected i+0 to turn off the system, i+# to set a new speed. It seems like none of the keys work.
Code:
{$CLEO .cs}
0000: NOP
thread "SPEEDLIMIT"
wait 0
var
$K1 : Int
$STORE : Float
$Sp1 : Float
$Sp2 : Float
$Sp3 : Float
$Sp4 : Float
$Sp5 : Float
$Sp6 : Float
$Sp7 : Float
$Sp8 : Float
$Sp9 : Float
end
:INI
wait 0
if
0AAB: file_exists "CLEO\speedlimit.ini"
jf [member=5120]Error[/member]
0AF0: $K1 = get_int_from_ini_file "CLEO\speedlimit.ini" section "KEY" key "tog-key"
$STORE = -1.0
0AF2: $Sp1 = get_float_from_ini_file "CLEO\speedlimit.ini" section "SPEED" key "speed-1"
0AF2: $Sp2 = get_float_from_ini_file "CLEO\speedlimit.ini" section "SPEED" key "speed-2"
0AF2: $Sp3 = get_float_from_ini_file "CLEO\speedlimit.ini" section "SPEED" key "speed-3"
0AF2: $Sp4 = get_float_from_ini_file "CLEO\speedlimit.ini" section "SPEED" key "speed-4"
0AF2: $Sp5 = get_float_from_ini_file "CLEO\speedlimit.ini" section "SPEED" key "speed-5"
0AF2: $Sp6 = get_float_from_ini_file "CLEO\speedlimit.ini" section "SPEED" key "speed-6"
0AF2: $Sp7 = get_float_from_ini_file "CLEO\speedlimit.ini" section "SPEED" key "speed-7"
0AF2: $Sp8 = get_float_from_ini_file "CLEO\speedlimit.ini" section "SPEED" key "speed-8"
0AF2: $Sp9 = get_float_from_ini_file "CLEO\speedlimit.ini" section "SPEED" key "speed-9"
jump [member=13229]speed[/member]LIMIT_84
:ERROR
wait 0
0AD1: show_formatted_text_highpriority "Using default values without INI" time 2000 0x0AD1
$K1 = 73
$STORE = -1.0
$Sp1 = 05.0
$Sp2 = 10.0
$Sp3 = 15.0
$Sp4 = 20.0
$Sp5 = 25.0
$Sp6 = 30.0
$Sp7 = 35.0
$Sp8 = 40.0
$Sp9 = 45.0
wait 500
jump [member=13229]speed[/member]LIMIT_84
:SPEEDLIMIT_84
wait 0
if
Player.Defined($PLAYER_CHAR)
jf [member=13229]speed[/member]LIMIT_84
if and
not $STORE = -1.0
Actor.Driving($PLAYER_ACTOR)
then
03C0: 0@ = actor $PLAYER_ACTOR car
02E3: 1@ = car 0@ speed
0089: 30@ = $STORE
if
0025: 1@ > 30@ // (float)
then
2@ = 12006488
2@ += 28 // brake
0A8C: write_memory 2@ size 1 value 255 virtual_protect 0
end
end
:SPEEDLIMIT_1001
if and
0AB0: key_pressed $K1
0AB0: key_pressed 48
jf [member=13229]speed[/member]LIMIT_1202
$STORE = -1.0
018C: play_sound 1056 at 0.0 0.0 0.0
wait 5
:SPEEDLIMIT_1202
if and
0AB0: key_pressed $K1
0AB0: key_pressed 49
jf [member=13229]speed[/member]LIMIT_1706
$STORE = $Sp1
018C: play_sound 1056 at 0.0 0.0 0.0
wait 5
:SPEEDLIMIT_1706
if and
0AB0: key_pressed $K1
0AB0: key_pressed 50
jf [member=13229]speed[/member]LIMIT_1769
$STORE = $Sp2
018C: play_sound 1056 at 0.0 0.0 0.0
wait 5
:SPEEDLIMIT_1769
if and
0AB0: key_pressed $K1
0AB0: key_pressed 51
jf [member=13229]speed[/member]LIMIT_1832
$STORE = $Sp3
018C: play_sound 1056 at 0.0 0.0 0.0
wait 5
:SPEEDLIMIT_1832
if and
0AB0: key_pressed $K1
0AB0: key_pressed 52
jf [member=13229]speed[/member]LIMIT_1875
$STORE = $Sp4
018C: play_sound 1056 at 0.0 0.0 0.0
wait 5
:SPEEDLIMIT_1875
if and
0AB0: key_pressed $K1
0AB0: key_pressed 53
jf [member=13229]speed[/member]LIMIT_1895
$STORE = $Sp5
018C: play_sound 1056 at 0.0 0.0 0.0
wait 5
:SPEEDLIMIT_1895
if and
0AB0: key_pressed $K1
0AB0: key_pressed 54
jf [member=13229]speed[/member]LIMIT_1991
$STORE = $Sp6
018C: play_sound 1056 at 0.0 0.0 0.0
wait 5
:SPEEDLIMIT_1991
if and
0AB0: key_pressed $K1
0AB0: key_pressed 55
jf [member=13229]speed[/member]LIMIT_2263
$STORE = $Sp7
018C: play_sound 1056 at 0.0 0.0 0.0
wait 5
:SPEEDLIMIT_2263
if and
0AB0: key_pressed $K1
0AB0: key_pressed 56
jf [member=13229]speed[/member]LIMIT_2515
$STORE = $Sp8
018C: play_sound 1056 at 0.0 0.0 0.0
wait 5
:SPEEDLIMIT_2515
if and
0AB0: key_pressed $K1
0AB0: key_pressed 57
jf [member=13229]speed[/member]LIMIT_2612
$STORE = $Sp9
018C: play_sound 1056 at 0.0 0.0 0.0
wait 5
jump [member=13229]speed[/member]LIMIT_2612
:SPEEDLIMIT_2612
jump [member=13229]speed[/member]LIMIT_84