#1 04-08-2009 09:27

mige
Registered: 04-08-2009
Posts: 2

adding more places to this code

Heres the script: (It is the one for fuel/gas)

PROBLEM: How to make it have more places to work?, i have tried to do it, and it showed the red marker, but it didnt do anything... PLS HELP. (TRYING TO ADD WORKING PITS FOR MY RACING TRACK)

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 

:NONAME_2
wait 0 
if and
   Player.Defined($PLAYER_CHAR)
  $ONMISSION == 0 
else_jump @NONAME_2 
if and
   Actor.Driving($PLAYER_ACTOR)
84A7:   not actor $PLAYER_ACTOR driving_boat 
84A9:   not actor $PLAYER_ACTOR driving_heli 
   not Actor.DrivingPlane($PLAYER_ACTOR)
84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 
89AE:   not actor $PLAYER_ACTOR driving_train 
else_jump @NONAME_2 
if and
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #BMX)
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #BIKE)
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #MTBIKE)
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #COMBINE)
else_jump @NONAME_2 
0570: 0@ = create_asset_radar_marker_with_icon 55 at 1944.852 -1769.554 13.0125 
0570: 1@ = create_asset_radar_marker_with_icon 55 at 2209.816 2481.934 10.8203 
0570: 2@ = create_asset_radar_marker_with_icon 55 at 604.8804 1705.273 6.541 
0570: 3@ = create_asset_radar_marker_with_icon 55 at -2414.49 982.081 45.2969 
0570: 4@ = create_asset_radar_marker_with_icon 55 at -2244.623 -2561.828 31.9219 
0570: 5@ = create_asset_radar_marker_with_icon 55 at -1327.512 2678.107 50.0625 
0570: 6@ = create_asset_radar_marker_with_icon 55 at -95.1488 -1174.303 1.9281 
0570: 7@ = create_asset_radar_marker_with_icon 55 at -1679.982 408.9051 7.2365 

0570: 13@ = create_asset_radar_marker_with_icon 55 at 652.03 -571.34 16.34 
0570: 14@ = create_asset_radar_marker_with_icon 55 at -1605.897 -2714.252 48.5335 
0570: 15@ = create_asset_radar_marker_with_icon 55 at -1471.48 1864.31 32.64 
0570: 16@ = create_asset_radar_marker_with_icon 55 at 1596.5 2199.1 10.83 
0570: 17@ = create_asset_radar_marker_with_icon 55 at 2145.9 2748.16 10.83 
0570: 18@ = create_asset_radar_marker_with_icon 55 at 2642.11 1106.53 10.83 
0570: 19@ = create_asset_radar_marker_with_icon 55 at 2117.42 920.42 10.83 
0570: 20@ = create_asset_radar_marker_with_icon 55 at 1381.68 456.26 19.91 
03C0: 8@ = actor $PLAYER_ACTOR car 
046C: 26@ = car 8@ driver 
if 
003B:   26@ == $PLAYER_ACTOR // (int) 
else_jump @NONAME_2 
0390: load_txd_dictionary "GASOLINE" 
038F: load_texture "SCALEF" as 1 // Load dictionary with 0390 first 
038F: load_texture "SCALEE" as 2 // Load dictionary with 0390 first 
038F: load_texture "ARROW" as 3 // Load dictionary with 0390 first 
038F: load_texture "LOCK" as 4 // Load dictionary with 0390 first 
wait 250 
gosub @NONAME_2122 
if 
88B7:   not test 12@ bit 1 
else_jump @NONAME_618 
0099: 10@ = random_int_in_ranges_0_to_32767 
08BD: set 12@ bit 1 
0A8C: write_memory 11@ size 1 value 12@ virtual_protect 0 
jump @NONAME_648 

:NONAME_618
0A97: 22@ = car 8@ struct 
0A8E: 23@ = 22@ + 5 // int 
0A8D: 10@ = read_memory 23@ size 4 virtual_protect 0 

:NONAME_648
wait 0 
if 
  $ONMISSION == 0 
else_jump @NONAME_1920 
if 
   Actor.InCar($PLAYER_ACTOR, 8@)
else_jump @NONAME_1818 
gosub @NONAME_2151 
if 
  10@ > 0 
else_jump @NONAME_2027 
02E3: 9@ = car 8@ speed 
if 
  9@ == 0.0 
else_jump @NONAME_750 
jump @NONAME_1818 

:NONAME_750
if and
  20.0 > 9@ 
  9@ > 1.0 
else_jump @NONAME_788 
10@ -= 1 

:NONAME_788
if and
  9@ > 20.0 
  35.0 > 9@ 
else_jump @NONAME_826 
10@ -= 2 

:NONAME_826
if and
  9@ > 35.0 
  50.0 > 9@ 
else_jump @NONAME_864 
10@ -= 3 

:NONAME_864
if 
  9@ > 50.0 
else_jump @NONAME_892 
10@ -= 4 

:NONAME_892
if and
8100:   not actor $PLAYER_ACTOR in_sphere 1944.852 -1769.554 13.0125 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere 2209.816 2481.934 10.8203 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere 604.8804 1705.273 6.541 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere -2414.49 982.081 45.2969 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere -2244.623 -2561.828 31.9219 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere -1327.512 2678.107 50.0625 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere -95.1488 -1174.303 1.9281 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere -1679.982 408.9051 7.2365 radius 1.5 1.5 1.0 sphere 0 in_car
else_jump @NONAME_1513 
if and
8100:   not actor $PLAYER_ACTOR in_sphere 652.03 -571.34 16.34 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere -1605.897 -2714.252 48.5335 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere -1471.48 1864.31 32.64 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere 1596.5 2199.1 10.83 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere 2145.9 2748.16 10.83 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere 2642.11 1106.53 10.83 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere 2117.42 920.42 10.83 radius 1.5 1.5 1.0 sphere 0 in_car 
8100:   not actor $PLAYER_ACTOR in_sphere 1381.68 456.26 19.91 radius 1.5 1.5 1.0 sphere 0 in_car 
else_jump @NONAME_1513 
jump @NONAME_1818 

:NONAME_1513
if 
  $ONMISSION == 0 
else_jump @NONAME_1920 
if 
  29000 > 10@ 
else_jump @NONAME_1818 
if 
   Player.Money($PLAYER_CHAR) > 0
else_jump @NONAME_2099 
31@ = Player.Money($PLAYER_CHAR)
wait 150 
03BF: set_player $PLAYER_CHAR ignored_by_everyone 1 
07CC: set_player $PLAYER_CHAR button_15 0 
24@ = 0 
Car.LockInCurrentPosition(8@) = True
Player.CanMove($PLAYER_CHAR) = False

:NONAME_1616
wait 0 
31@ = Player.Money($PLAYER_CHAR)
0085: 30@ = 31@ // (int) 
0062: 30@ -= 24@ // (int) 
if 
   not 1 > 30@ 
else_jump @NONAME_2076 
if 
  29700 >= 10@ 
else_jump @NONAME_1767 
if 
  $ONMISSION == 0 
else_jump @NONAME_1920 
if 
   Actor.InCar($PLAYER_ACTOR, 8@)
else_jump @NONAME_1920 
gosub @NONAME_2151 
10@ += 300 
097A: play_audio_at 0.0 0.0 0.0 event 1133 
24@ += 1 
jump @NONAME_1616 

:NONAME_1767
24@ *= -1 
Player.Money($PLAYER_CHAR) += 24@
036A: put_actor $PLAYER_ACTOR in_car 8@ 
Car.LockInCurrentPosition(8@) = False
Player.CanMove($PLAYER_CHAR) = True
07CC: set_player $PLAYER_CHAR button_15 1 
03BF: set_player $PLAYER_CHAR ignored_by_everyone 0 

:NONAME_1818
if or
   Actor.Dead($PLAYER_ACTOR)
   Car.Wrecked(8@)
else_jump @NONAME_1853 
08C3: clear 12@ bit 1 
jump @NONAME_1928 

:NONAME_1853
0A97: 22@ = car 8@ struct 
0A8E: 23@ = 22@ + 5 // int 
0A8C: write_memory 23@ size 4 value 10@ virtual_protect 0 
if 
  $ONMISSION == 0 
else_jump @NONAME_1920 
if 
   not Actor.InCar($PLAYER_ACTOR, 8@)
else_jump @NONAME_648 

:NONAME_1920
wait 0 
03F0: enable_text_draw 0 

:NONAME_1928
Marker.Disable(0@)
Marker.Disable(1@)
Marker.Disable(2@)
Marker.Disable(3@)
Marker.Disable(4@)
Marker.Disable(5@)
Marker.Disable(6@)
Marker.Disable(7@)
Marker.Disable(13@)
Marker.Disable(14@)
Marker.Disable(15@)
Marker.Disable(16@)
Marker.Disable(17@)
Marker.Disable(18@)
Marker.Disable(19@)
Marker.Disable(20@)
08C3: clear 12@ bit 1 
wait 1250 
jump @NONAME_2 

:NONAME_2027
10@ = 0 
if 
047A:   actor $PLAYER_ACTOR driving_bike 
else_jump @NONAME_2062 
02D4: car 8@ turn_off_engine 
jump @NONAME_892 

:NONAME_2062
081D: set_car 8@ engine_operation 1 
jump @NONAME_892 

:NONAME_2076
00BC: show_text_highpriority GXT 'GA_3' time 3000 flag 1  // No more freebies~n~$100 to respray!
jump @NONAME_1767 

:NONAME_2099
00BC: show_text_highpriority GXT 'NOMONEY' time 3000 flag 1  // ~s~You need more cash!
jump @NONAME_1818 

:NONAME_2122
0A97: 11@ = car 8@ struct 
11@ += 4 
0A8D: 12@ = read_memory 11@ size 1 virtual_protect 0 
return 

:NONAME_2151
if 
  10@ > 5000 
else_jump @NONAME_2217 
03F0: enable_text_draw 1 
038D: draw_texture 1 position 573.3 382.7 size 128.0 64.0 RGBA 255 255 255 255 
jump @NONAME_2276 

:NONAME_2217
if 
  5000 > 10@ 
else_jump @NONAME_2276 
03F0: enable_text_draw 1 
038D: draw_texture 2 position 573.3 382.7 size 128.0 64.0 RGBA 255 255 255 255 

:NONAME_2276
27@ = 66.0 
29@ = 520.0 
28@ = 33000 
0062: 28@ -= 10@ // (int) 
0093: 25@ = integer 28@ to_float 
25@ /= 500.0 
0063: 27@ -= 25@ // (float) 
005B: 29@ += 27@ // (float) 
03F0: enable_text_draw 1 
038D: draw_texture 3 position 29@ 391.9 size 16.0 16.0 RGBA 255 255 255 255 
09B3: get_car 8@ door_status 21@ 
if 
   not 21@ == 1 
else_jump @NONAME_2452 
03F0: enable_text_draw 1 
038D: draw_texture 4 position 570.0 410.0 size 24.0 24.0 RGBA 255 255 255 255 

:NONAME_2452
return

Offline

Board footer

Powered by FluxBB