Vehicle Recording

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 11

// This file was decompiled using SASCM.

ini published by GTAG


(http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}
{$USE CLEO+}
{$USE file}
{$USE ini}

0000: NOP
Model.Load(19134)
038B: load_requested_models
if
Model.Available(19134)
jf @Noname_290
1@ = 1085
wait 0
Object.Create(29@, 1@, 2304.301, 2636.737, 6.547)
Object.Create(29@, 1@, -1505.923, 1001.77, 7.2957)
Object.Create(29@, 1@, 2631.781, -2402.102, 13.5785)
Object.Create(29@, 1@, -2851.032, 465.5264, 4.2063)
Object.Create(29@, 1@, -1671.756, 4.279, 3.6798)
Object.Create(29@, 1@, 2764.826, 1314.33, 11.715)
Object.Create(29@, 1@, 2774.322, 915.2195, 10.984)
Object.Create(29@, 1@, 319.8676, -1706.631, 6.5321)
Object.Create(29@, 1@, 1207.845, -150.6011, 39.7201)
Object.Create(29@, 1@, 838.7806, 856.3649, 14.356)
Object.Create(29@, 1@, 499.2616, 918.1783, -28.55)

:Noname_290
alloc $isafk = allocate_memory_size 260

:Noname_298
wait 0
SAMP.Available
jf @Noname_298
31@ = Render.CreateFont("Arial Black", 10, 5)
0BFC: set_global_var "font" = 31@
0B34: samp register_client_command "VehicleRecording" to_label @Noname_4761
0B34: samp register_client_command "DriveLoop" to_label @Noname_4582
0B34: samp register_client_command "drl" to_label @Noname_4582
0B34: samp register_client_command "cpsavepos" to_label @Noname_4623
chatmsg "{FF0000}/VehicleRecording:{FFFFFF} to get help!" color -1

:Noname_471
if
0AA2: 0@ = load_library "samp.dll" // IF and SET
jf @Noname_585
0A8E: 1@ = 0@ + 2203916 // int
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 36
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
if
1@ == 1
jf @Noname_578
31@ = 1
0AA3: free_library 0@
jump @Noname_585

:Noname_578
31@ = 0
:Noname_585
if
31@ == 1
jf @Noname_727
03F0: enable_text_draw 1
if
0AA2: 0@ = load_library "samp.dll" // IF and SET
jf @Noname_720
0A8E: 1@ = 0@ + 2203916 // int
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 12
0A8D: 15@ = read_memory 1@ size 4 virtual_protect 0
1@ += 4
0A8D: 16@ = read_memory 1@ size 4 virtual_protect 0
1@ += 4
0A8D: 17@ = read_memory 1@ size 4 virtual_protect 0
0AA3: free_library 0@

:Noname_720
jump @Noname_748

:Noname_727
15@ = 0
16@ = 0
17@ = 0

:Noname_748
wait 0
wait 0
if
Actor.Driving($PLAYER_ACTOR)
jf @Noname_4048
if and
not SAMP.ChatInputOpened
key_down 79
jf @Noname_1224

:Noname_789
wait 0
not key_down 79
jf @Noname_789
TIMERA = 0
if
0AAB: file_exists "CLEO\rute\VehicleRecording.path"
jf @Noname_892
0B00: delete_file "CLEO\rute\VehicleRecording.path" // IF and SET

:Noname_892
chatmsg "{FF0000}Vehicle Recording:{FFFFFF} recording a new path!!" color -1
0@ = Actor.CurrentCar($PLAYER_ACTOR)
0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 0.0 0.0 0.0
018A: 29@ = create_checkpoint_at 1@ 2@ 3@
31@ = File.Open("CLEO\rute\VehicleRecording.path", "wb+")

:Noname_1050
wait 0
if
not Actor.Driving($PLAYER_ACTOR)
jf @Noname_1077
jump @Noname_1199

:Noname_1077
call @Noname_4367 0
if
TIMERA > 200
jf @Noname_1188
TIMERA = 0
0@ = Actor.CurrentCar($PLAYER_ACTOR)
0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 0.0 0.0 0.0
02E3: 4@ = car 0@ speed
File.Write(31@, 16, 1@)
018C: play_sound 1052 at 0.0 0.0 0.0

:Noname_1188
key_down 79
jf @Noname_1050

:Noname_1199
Marker.Disable(29@)
File.Close(31@)

:Noname_1209
wait 0
not key_down 79
jf @Noname_1209

:Noname_1224
if
key_down 219
jf @Noname_1344
if or
00EE: actor $PLAYER_ACTOR sphere 0 near_point 838.7806 856.3649 radius 14.356
100.0 in_car
00EE: actor $PLAYER_ACTOR sphere 0 near_point 499.2616 918.1783 radius -28.55
100.0 in_car
jf @Noname_1344
if
30@ == 1
jf @Noname_1337
30@ = 0
jump @Noname_1344

:Noname_1337
30@ = 1

:Noname_1344
if
not SAMP.ChatInputOpened
jf @Noname_4048
if or
30@ == 1
key_down 80
jf @Noname_4048

:Noname_1379
wait 0
not key_down 80
jf @Noname_1379
if
0AAB: file_exists "CLEO\rute\VehicleRecording.path"
jf @Noname_4048
31@ = 0
if and
15@ == 1141376069
16@ == 1146416534
17@ == -1037873185
jf @Noname_1519
31@ = File.Open("CLEO\rute\ruta1.path", "rb")

:Noname_1519
if and
15@ == 1142574424
16@ == 1145904326
17@ == -1037715925
jf @Noname_1591
31@ = File.Open("CLEO\rute\ruta2.path", "rb")

:Noname_1591
if and
15@ == 1143484637
16@ == 1146268303
17@ == -1037713723
jf @Noname_1663
31@ = File.Open("CLEO\rute\ruta3.path", "rb")

:Noname_1663
if and
15@ == 1143683138
16@ == 1147170406
17@ == -1038568627
jf @Noname_1735
31@ = File.Open("CLEO\rute\ruta4.path", "rb")

:Noname_1735
if and
15@ == 1142408602
16@ == 1146660715
17@ == -1038244433
jf @Noname_1807
31@ = File.Open("CLEO\rute\ruta5.path", "rb")

:Noname_1807
if and
15@ == 1141893625
16@ == 1147627799
17@ == -1037716659
jf @Noname_1879
31@ = File.Open("CLEO\rute\ruta6.path", "rb")

:Noname_1879
if and
15@ == 1146291193
16@ == 1147342617
17@ == 1096137834
jf @Noname_2153
if
18@ == 0
jf @Noname_1969
31@ = File.Open("CLEO\rute\ruta0.path", "rb")

:Noname_1969
18@ += 1
if
18@ == 1
jf @Noname_2026
31@ = File.Open("CLEO\rute\ruta01.path", "rb")

:Noname_2026
if
18@ == 2
jf @Noname_2083
31@ = File.Open("CLEO\rute\ruta02.path", "rb")
18@ = 0

:Noname_2083
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 499.2616 918.1783 radius -28.55
100.0 in_car
jf @Noname_2153
31@ = File.Open("CLEO\rute\rutaup.path", "rb")

:Noname_2153
if and
15@ == -988285285
16@ == 1158670933
17@ == 1084190255
jf @Noname_2227
31@ = File.Open("CLEO\rute\bayside.path", "rb")

:Noname_2227
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 2304.301 2636.737 radius 6.547
500.0 in_car
jf @Noname_2300
31@ = File.Open("CLEO\rute\rumpokacc.path", "rb")

:Noname_2300
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point -1505.923 1001.77 radius 7.2957
500.0 in_car
jf @Noname_2374
31@ = File.Open("CLEO\rute\downtownsf.path", "rb")

:Noname_2374
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 2631.781 -2402.102 radius 13.5785
100.0 in_car
jf @Noname_2449
31@ = File.Open("CLEO\rute\boceandocks.path", "rb")

:Noname_2449
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point -2851.032 465.5264 radius 4.2063
100.0 in_car
jf @Noname_2525
31@ = File.Open("CLEO\rute\boaceanflats.path", "rb")

:Noname_2525
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point -1671.756 4.279 radius 3.6798 100.0
in_car
jf @Noname_2601
31@ = File.Open("CLEO\rute\beasterbasin.path", "rb")

:Noname_2601
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 2764.826 1314.33 radius 11.715
100.0 in_car
jf @Noname_2678
31@ = File.Open("CLEO\rute\blidenstation.path", "rb")

:Noname_2678
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 2774.322 915.2195 radius 10.984
100.0 in_car
jf @Noname_2755
31@ = File.Open("CLEO\rute\brockshoreest.path", "rb")

:Noname_2755
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 319.8676 -1706.631 radius 6.5321
100.0 in_car
jf @Noname_2823
31@ = File.Open("CLEO\rute\bsmb.path", "rb")

:Noname_2823
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 1207.845 -150.6011 radius 39.7201
30.0 in_car
jf @Noname_2898
31@ = File.Open("CLEO\rute\tractoruniv.path", "rb")

:Noname_2898
if and
15@ == 1159444480
16@ == 1142921232
17@ == 1094145016
jf @Noname_2968
31@ = File.Open("CLEO\rute\p57.path", "rb")

:Noname_2968
if and
15@ == 1159693353
16@ == 1142928425
17@ == 1093587278
jf @Noname_3038
31@ = File.Open("CLEO\rute\p55.path", "rb")

:Noname_3038
if and
15@ == 1159567360
16@ == 1142918332
17@ == 1093588432
jf @Noname_3108
31@ = File.Open("CLEO\rute\p56.path", "rb")

:Noname_3108
if and
15@ == 1159817216
16@ == 1142915088
17@ == 1092584682
jf @Noname_3178
31@ = File.Open("CLEO\rute\p54.path", "rb")

:Noname_3178
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 2491.539 646.5613 radius 10.3943
30.0 in_car
jf @Noname_3250
31@ = File.Open("CLEO\rute\p57plant.path", "rb")

:Noname_3250
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 2549.515 646.6262 radius 10.3437
20.0 in_car
jf @Noname_3322
31@ = File.Open("CLEO\rute\p55plant.path", "rb")

:Noname_3322
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 2659.485 617.899 radius 9.7921 20.0
in_car
jf @Noname_3394
31@ = File.Open("CLEO\rute\p62plant.path", "rb")

:Noname_3394
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 2521.177 644.6517 radius 10.4658
20.0 in_car
jf @Noname_3466
31@ = File.Open("CLEO\rute\p56plant.path", "rb")

:Noname_3466
if
00EE: actor $PLAYER_ACTOR sphere 0 near_point 2582.356 641.8798 radius 10.1826
20.0 in_car
jf @Noname_3538
31@ = File.Open("CLEO\rute\p54plant.path", "rb")

:Noname_3538
if
31@ == 0
jf @Noname_3598
31@ = File.Open("CLEO\rute\VehicleRecording.path", "rb")

:Noname_3598
wait 0
if
not Actor.Driving($PLAYER_ACTOR)
jf @Noname_3625
jump @Noname_4028

:Noname_3625
if and
not SAMP.ChatInputOpened
key_down 80
jf @Noname_3649
jump @Noname_4028

:Noname_3649
0@ = Actor.CurrentCar($PLAYER_ACTOR)
File.Read(31@, 4, 1@)
File.Read(31@, 4, 2@)
File.Read(31@, 4, 3@)
File.Read(31@, 4, 4@)
File.Read(31@, 4, 1@)
File.Read(31@, 4, 2@)
File.Read(31@, 4, 3@)
File.Read(31@, 4, 4@)

:Noname_3737
wait 0
if
not Actor.Driving($PLAYER_ACTOR)
jf @Noname_3771
30@ = 0
jump @Noname_4016

:Noname_3771
if and
key_down 80
not SAMP.ChatInputOpened
jf @Noname_3802
30@ = 0
jump @Noname_4016

:Noname_3802
call @Noname_4362 0
0407: store_coords_to 6@ 7@ 8@ from_car 0@ with_offset 0.0 0.0 0.0
call @Noname_4055 4 1@ 2@ 6@ 7@
02E3: 5@ = car 0@ speed
if
0025: 5@ > 4@ // (float)
jf @Noname_3907
call @Noname_4514 0
jump @Noname_3917

:Noname_3907
call @Noname_4548 0

:Noname_3917
SAMP.Convert3DCoordsToScreen(1@, 2@, 3@, 9@, 10@)
SAMP.Convert3DCoordsToScreen(6@, 7@, 8@, 11@, 12@)
if
00C2: sphere_onscreen 1@ 2@ 3@ radius 5.0
jf @Noname_3978

:Noname_3978
0100: actor $PLAYER_ACTOR in_sphere 1@ 2@ 3@ radius 5.0 5.0 5.0 sphere 0 in_car
jf @Noname_3737

:Noname_4016
File.EOF(31@)
jf @Noname_3598

:Noname_4028
File.Close(31@)

:Noname_4033
wait 0
not key_down 80
jf @Noname_4033

:Noname_4048
jump @Noname_471

:Noname_4055
call @Noname_4327 4 0@ 1@ 2@ 3@ 31@
30@ = Actor.Angle($PLAYER_ACTOR)
30@ -= 360.0
0097: make 30@ absolute_float
005B: 31@ += 30@ // (float)
02F6: 30@ = sine 31@ // (float)
02F7: 31@ = cosine 31@ // (float)
0604: get_Z_angle_for_point 30@ 31@ store_to 31@
if and
31@ > 180.0
355.0 > 31@
jf @Noname_4224
SAMP.SetGameKeyState(0, -255)
if
200.0 > 31@
jf @Noname_4211
SAMP.SetGameKeyState(6, 255)
jump @Noname_4217

:Noname_4211
SAMP.SetGameKeyState(6, 0)

:Noname_4217
jump @Noname_4322

:Noname_4224
if and
31@ > 5.0
180.0 >= 31@
jf @Noname_4310
SAMP.SetGameKeyState(0, 255)
if
31@ > 160.0
jf @Noname_4297
SAMP.SetGameKeyState(6, 255)
jump @Noname_4303

:Noname_4297
SAMP.SetGameKeyState(6, 0)

:Noname_4303
jump @Noname_4322

:Noname_4310
SAMP.SetGameKeyState(0, 0)
SAMP.SetGameKeyState(6, 0)

:Noname_4322
ret 0

:Noname_4327
0063: 0@ -= 2@ // (float)
0063: 1@ -= 3@ // (float)
0604: get_Z_angle_for_point 0@ 1@ store_to 4@
ret 1 4@

:Noname_4362
ret 0

:Noname_4367
if
Actor.Driving($PLAYER_ACTOR)
jf @Noname_4509
0@ = Actor.CurrentCar($PLAYER_ACTOR)
0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 0.0 0.0 0.0
0BFD: 31@ = get_global_var "font"
SAMP.Convert3DCoordsToScreen(1@, 2@, 3@, 4@, 5@)
6@ = Render.FontDrawLength(31@, "RECORDING")
6@ /= 2
0062: 4@ -= 6@ // (int)
Render.DrawText(31@, "RECORDING", 4@, 5@, -65536)

:Noname_4509
ret 0

:Noname_4514
0@ = 12006488
0@ += 12
0A8C: write_memory 0@ size 1 value 255 virtual_protect 0
ret 0

:Noname_4548
0@ = 12006488
0@ += 32
0A8C: write_memory 0@ size 1 value 255 virtual_protect 0
ret 0

:Noname_4582
if
30@ == 1
jf @Noname_4614
30@ = 0
jump @Noname_4621

:Noname_4614
30@ = 1

:Noname_4621
SAMP.CmdRet

:Noname_4623
if
not 15@ == 0
jf @Noname_4759
0AF1: write_int 15@ to_ini_file "cleo\savedcp.ini" section "loc" key "x"
0AF1: write_int 16@ to_ini_file "cleo\savedcp.ini" section "loc" key "y"
0AF1: write_int 17@ to_ini_file "cleo\savedcp.ini" section "loc" key "z"
chatmsg "Pozitie cp salvata" color -1

:Noname_4759
SAMP.CmdRet

:Noname_4761
chatmsg "{FF0000}Vehicle Recording:{FFFFFF} use O to start/stop recording." color -
1
chatmsg "{FF0000}Vehicle Recording:{FFFFFF} press P to play/stop the recorded
path." color -1
chatmsg "{FF0000}Vehicle Recording:{FFFFFF} write /DriveLoop play it without
stopping." color -1
SAMP.CmdRet

You might also like