CLEO Help Code is crash x2

CLEO related
Status
Not open for further replies.

UG-BASE

Active member
Joined
Apr 20, 2015
Messages
40
Reaction score
0
Code:
{$CLEO}

0000:
thread "veh" 

:1473
 wait 400 ms 
Samp.Available()
jf @1473
 if 
8AAB:   not file_exists "CLEO\vehicle.ini" 
jf @1626
0AD3: 19@v = format "vehicle"  
0AF5: write_string 19@v to_ini_file "cleo\vehicle.ini" section "Configuration" key "Cmd" 
0AF3: write_float -11.0 to_ini_file "cleo\vehicle.ini" section "Configuration" key "Z" 
jump @1626

:1626 
0AF4: 15@v = read_string_from_ini_file "cleo\vehicle.ini" section "Configuration" key "Cmd" 
0B34: samp register_client_command 15@v to_label @1731

:1702
 wait 0 ms 
 if 
0039:   29@ == 1     // 0039
jf @1702
 jump @1740

:1731
 29@ = 1 // 0006
Samp.CmdRet()

:1740
 wait 0 ms 
0B35: samp 2@ = get_last_command_params 
0AD4: 2@ = scan_string 2@ format "%d" 0@  
 if and
  0@ >= 400    // 0029
  not  0@ > 611    //8019:
jf @2619 
 if 
056E:   car 5@ defined 
jf @1841
00A0: store_actor $PLAYER_ACTOR position_to 10@ 11@ 12@ 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 10@ 11@ 12@ 
00A6: destroy_car 5@ 

:1841
wait 0 ms 
 if 
0248:   model 0@ available 
jf @1868
jump @1880 

:1868
0247: load_model 0@ 
jump @1841

:1880
0172: 28@ = actor $PLAYER_ACTOR Z_angle 
00A0: store_actor $PLAYER_ACTOR position_to 10@ 11@ 12@ 
00A5: 5@ = create_car 0@ at 10@ 11@ 12@ 
0249: release_model 0@ 
036A: put_actor $PLAYER_ACTOR in_car 5@ 
0175: set_car 5@ Z_angle_to 28@ 
02AC: set_car 5@ immunities BP 1 FP 1 EP 1 CP 1 MP 1 
01EC: make_car 5@ very_heavy 1 
0AF0: 16@ = get_int_from_ini_file "cleo\vehicle.ini" section "Configuration" key "FHmod" 
if 
   16@ == 0      // 0039
0AA0: gosub_if_false @2109
0AD0: show_formatted_text_lowpriority "Car id: ~b~%d ~w~FH mode: ~b~%d ~n~~n~~l~" time 4000 0@ 16@  
 29@ = 0          // 0006
jump @1626

:2109
0AB1: call_scm_func @2479 1 -2126  
return 
0000: NOP 
 if 
0AF2: 10@ = get_float_from_ini_file "cleo\vehicle.ini" section "Configuration" key "Z" 
0AA0: gosub_if_false @2187 
jump @2273

:2187
0AF3: write_float -11.0 to_ini_file "cleo\vehicle.ini" section "Configuration" key "Z" 
0AF2: 10@ = get_float_from_ini_file "cleo\vehicle.ini" section "Configuration" key "Z" 
 return 

:2273
 wait 750 ms 
 if 
00DF:   actor $PLAYER_ACTOR driving 
jf @2342
00A0: store_actor $PLAYER_ACTOR position_to 2@ 3@ 4@ 
0063: 4@ -= 10@ // (float) 
0AB1: call_scm_func @2348 3 2@ 3@ 4@  
jump @2273

:2342
 wait 0 ms 
 end_thread // 004E:

:2348
0B2B: samp 3@ = get_player_id_by_actor_handle $PLAYER_ACTOR 
0B24: samp 3@ = get_player_struct_ptr 3@ 
000A: 3@ += 55    
0AC8: 4@ = allocate_memory_size 68 
0C10: memcpy destination 4@ source 3@ size 68 
0C0D: struct 4@ offset 6 size 4 = 0@ 
0C0D: struct 4@ offset 10 size 4 = 1@ 
0C0D: struct 4@ offset 14 size 4 = 2@ 
0B3D: raknet 5@ = new_bit_stream 
0B40: raknet bit_stream 5@ write 212 type 0 size 1 
0B40: raknet bit_stream 5@ write 4@ type 5 size 68 
0B42: raknet send bit_stream 5@ priority 1 reliability 7 ordering_channel 0 
0B3E: raknet delete_bit_stream 5@ 
0AC9: free_allocated_memory 4@ 
0AB2: ret 0 

:2479
0A9F: 32@ = current_thread_pointer 
000A: 32@ += 16 
0A8D: 32@ = read_memory 32@ size 4 virtual_protect 0 
0062: 32@ -= 0@ // (int) 
0AA7: call_function 4607008 num_params 1 pop 1 32@ 33@  
005A: 32@ += 0@ // (int) 
000A: 33@ += 16 
0A8C: write_memory 33@ size 4 value 32@ virtual_protect 0 
000A: 33@ += 44 
0006: 32@ = 0     

:2570
0A8C: write_memory 33@ size 4 value 1@(32@,30i) virtual_protect 0 
000A: 33@ += 4 
000A: 32@ += 1 
0019:   32@ > 30 
jf @2570 
0AB2: ret 0 

:2619
wait 0
0AF4: 15@v = read_string_from_ini_file "cleo\vehicle.ini" section "Configuration" key "Cmd" 
0AF8: samp add_message_to_chat " Enter /%s [id car]" color 16777215 15@v  
0AF8: samp add_message_to_chat " 400->611" color 16777215  
 29@ = 0 
jump @1702

Crash when activated, help fix
work 0.3.7?

[member=23540]Mr.Christmas[/member]
[member=14423]Ju4n_Kr4t0s[/member]
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
How about you try making something yourself? Or learn what the fuck you're doing for that matter, instead of badly editing scripts and then wonder why the fuck they don't work? 
 
Status
Not open for further replies.
Top