CLEO Help [HELP]Define player on foot

CLEO related
Status
Not open for further replies.

MasterXVQ

Member
Joined
Feb 18, 2014
Messages
22
Reaction score
0
Hello again.
I know it is posible to define the nearest player on foot.
Someone could help me how can i do that?
Thanks.
 

ejexter

Well-known member
Joined
Feb 21, 2014
Messages
211
Reaction score
0
MasterXVQ link said:
Hello again.
I know it is posible to define the nearest player on foot.
Someone could help me how can i do that?
Thanks.
Code:
:YOUR_LABEL
wait 0
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@ 
if
0256: player 1@ defined
jf @YOUR_LABEL
if
not Actor.Driving(1@)
then
//IF HE ON FOOT
else
//IF HE IN CAR
end
 

MasterXVQ

Member
Joined
Feb 18, 2014
Messages
22
Reaction score
0
This isn't what i expecting.
I think.. It allows me define player in car and then when he leave it i can do it with him what i want.

I look for something like Slapall.cs by spexx.
This allows define many player around us and slap them in air.

Someone could help again please?

Code:
{$CLEO}

0662: "Spexx"  
0B34: samp register_client_command "Slapall" to_label @togon
31@ = false    
     

:loop
wait 0
if
31@ == true
jf @loop
goto @spexx_0



:togon
wait 0
if
31@ == false
jf @togoff
print "on" 2000
0AF8: samp add_message_to_chat "{44FF44}[Streamslapper] {FF4444}Use:{FFFFFF} Press/Hold key > {44FF44}R{FFFFFF} < to slap all clsoest streamed people.  " color 12517890 
0AF8: samp add_message_to_chat "{44FF44}[Streamslapper] {FF4444}Use:{FFFFFF} Aim and press {44FF44}Left Mouse Button{FFFFFF} to slap target player.  " color 12517890     
31@ = true
SAMP.CmdRet
goto @loop





:togoff
wait 0
if
31@ == true
jf @togon
print "off" 2000
31@ = false
SAMP.CmdRet
goto @loop


:spexx_Aim
wait 0
if and
31@ == true
key_down 1
else_jump @Spexx_0
call @Label949 1 400.0 26@ 
if 
056D:   actor 26@ defined
else_jump @Pedsinarea 
0B2B: samp 24@ = get_player_id_by_actor_handle 26@
0AD1: show_formatted_text_highpriority "~Y~Slapping ~B~ID ~>~ ~G~[%i]~<~ ~W~." time 2000 24@  
04C4: store_coords_to 3@ 4@ 5@ from_actor 26@ with_offset 0.0 0 -1.7   
0AE2: 23@ = random_vehicle_near_point 3@ 4@ 5@ in_radius 99999.0 find_next 0 pass_wrecked 1 
if  
056E:   car 23@ defined     
else_jump @Carsinarea  
046C: 22@ = car 23@ driver 
00D6: if 
856D:   not actor 22@ defined 
else_Jump @Spexx_Cardriver
Jump @Continue

:Spexx_0
wait 0 
if and
31@ == true
key_Down 82
else_jump @Spexx_Aim 
wait 0 
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)  // SEARCHING START POS
3@ = 300.0 // SEARCH RADIUS
gosub @AIC_GETACTOR  // GET ACTOR WICH IS AT POS 0@ 1@ 2@ TO 26@ 
if
056D:   actor 26@ defined
else_jump @Pedsinarea 
0B2B: samp 24@ = get_player_id_by_actor_handle 26@
0AD1: show_formatted_text_highpriority "~Y~Slapping ~B~ID ~>~ ~G~[%i]~<~ ~W~." time 2000 24@  
04C4: store_coords_to 3@ 4@ 5@ from_actor 26@ with_offset 0.0 0 -1.7   
0AE2: 23@ = random_vehicle_near_point 3@ 4@ 5@ in_radius 99999.0 find_next 0 pass_wrecked 1 
if  
056E:   car 23@ defined     
else_jump @Carsinarea  
046C: 22@ = car 23@ driver 
00D6: if 
856D:   not actor 22@ defined 
else_Jump @Spexx_Cardriver
Jump @Continue

:Continue
wait 0
29@ = car.Model(23@)  
if and 
not 29@ == #VCNMAV
not 29@ == #Skimmer
not 29@ == #RUSTLER
not 29@ == #BEAGLE
not 29@ == #CROPDUST
not 29@ == #STUNT
not 29@ == #SHAMAL
not 29@ == #HYDRA
else_jump @Deletecar 
if and
not 29@ == #NEVADA 
not 29@ == #AT400
not 29@ == #ANDROM 
not 29@ == #DODO
not 29@ == #CARGOBOB
not 29@ == #HUNTER
not 29@ == #LEVIATHN 
not 29@ == #MAVERICK
else_jump @Deletecar 
if and
not 29@ == #POLMAV
not 29@ == #RAINDANC
not 29@ == #SEASPAR
not 29@ == #SPARROW
not 29@ == #NRG500
not key_Down 46  
else_jump @Deletecar 
if and
not 29@ == #BIKE
not 29@ == 510
not 29@ == 481
not 29@ == #DUMPER
not 29@ == #BAGGAGE
not 29@ == #SANCHEZ
not 29@ == #PIZZABOY
not 29@ == #SANCHEZ  
else_jump @Deletecar  
if
Actor.Stopped(26@)
jf @Moving        
if
not actor.Driving(26@)  
jf @Driving    
Jump @Spexx_2         
     
:Spexx_2
wait 0 
8@ = SAMP.GetSAMPVehicleIDByCarHandle(23@)   
04C4: store_coords_to 3@ 4@ 5@ from_actor 26@ with_offset 0.0 0 -1.8
Jump @Spexx_Script 

:Spexx_Script  
wait 0
099A: set_car 23@ collision_detection 0
Car.PutAt(23@, 3@, 4@, 5@) 
wait 0
0AC8: 6@ = allocate_memory_size 67 
0C0D: struct 6@ offset 0 size 2 = 8@ 
0C0D: struct 6@ offset 2 size 1 = 65535 
0C0D: struct 6@ offset 3 size 4 = -1.0 
0C0D: struct 6@ offset 7 size 4 = -0.01 
0C0D: struct 6@ offset 11 size 4 = 0.05 
0C0D: struct 6@ offset 15 size 4 = 0.09 
0C0D: struct 6@ offset 19 size 4 = -1.0 
0C0D: struct 6@ offset 23 size 4 = 0.02 
0C0D: struct 6@ offset 27 size 4 = 3@ 
0C0D: struct 6@ offset 31 size 4 = 4@ 
0C0D: struct 6@ offset 35 size 4 = 5@ 
0C0D: struct 6@ offset 39 size 4 = 0.0  // Speed side
0C0D: struct 6@ offset 43 size 4 = 0.0  // Speed fowards
0C0D: struct 6@ offset 47 size 4 = 400.0  // Speed Up/-down
0C0D: struct 6@ offset 51 size 4 = 0.0 
0C0D: struct 6@ offset 55 size 4 = 0.0 
0C0D: struct 6@ offset 59 size 4 = 0.0 
0C0D: struct 6@ offset 63 size 4 = 1000.0 
0B3D: raknet 5@ = new_bit_stream 
0B40: raknet bit_stream 5@ write 214 type 0 size 1 
0B40: raknet bit_stream 5@ write 6@ type 5 size 67 
0B8B: raknet send bit_stream 5@ 
0B3E: raknet delete_bit_stream 5@ 
0AC9: free_allocated_memory 6@ 
099A: set_car 23@ collision_detection 1
Jump @Spexx_0


:Spexx_Script_2  
wait 0
099A: set_car 23@ collision_detection 0
Car.PutAt(23@, 3@, 4@, 5@) 
wait 0
0AC8: 6@ = allocate_memory_size 67 
0C0D: struct 6@ offset 0 size 2 = 8@ 
0C0D: struct 6@ offset 2 size 1 = 65535 
0C0D: struct 6@ offset 3 size 4 = -1.0 
0C0D: struct 6@ offset 7 size 4 = -0.01 
0C0D: struct 6@ offset 11 size 4 = 0.05 
0C0D: struct 6@ offset 15 size 4 = 0.09 
0C0D: struct 6@ offset 19 size 4 = -1.0 
0C0D: struct 6@ offset 23 size 4 = 0.02 
0C0D: struct 6@ offset 27 size 4 = 3@ 
0C0D: struct 6@ offset 31 size 4 = 4@ 
0C0D: struct 6@ offset 35 size 4 = 5@ 
0C0D: struct 6@ offset 39 size 4 = 0.0  // Speed side
0C0D: struct 6@ offset 43 size 4 = -400.0  // Speed fowards
0C0D: struct 6@ offset 47 size 4 = 0.0  // Speed Up/-down
0C0D: struct 6@ offset 51 size 4 = 0.0 
0C0D: struct 6@ offset 55 size 4 = 0.0 
0C0D: struct 6@ offset 59 size 4 = 0.0 
0C0D: struct 6@ offset 63 size 4 = 0.0 
0B3D: raknet 5@ = new_bit_stream 
0B40: raknet bit_stream 5@ write 214 type 0 size 1 
0B40: raknet bit_stream 5@ write 6@ type 5 size 67 
0B8B: raknet send bit_stream 5@ 
0B3E: raknet delete_bit_stream 5@ 
0AC9: free_allocated_memory 6@ 
099A: set_car 23@ collision_detection 1
Jump @Spexx_0


 :Newcar
 wait 0
 car.Destroy(23@)
 Jump @Spexx_0

 :Moving
 wait 0    
 8@ = SAMP.GetSAMPVehicleIDByCarHandle(23@)         
 04C4: store_coords_to 3@ 4@ 5@ from_actor 26@ with_offset 0.0 1.8 -1.8 
 Jump @Spexx_Script
 
  :Driving
 wait 0    
 8@ = SAMP.GetSAMPVehicleIDByCarHandle(23@)         
 04C4: store_coords_to 3@ 4@ 5@ from_actor 26@ with_offset 0.0 4.0 1.0 
 Jump @Spexx_Script_2
  
 :Deletecar
 wait 0
 car.Destroy(23@)
 Jump @Spexx_0

:Spexx_Cardriver
wait 0
0AE2: 23@ = random_vehicle_near_point 3@ 4@ 5@ in_radius 99999.0 find_next 1 pass_wrecked 1
if  
056E:   car 23@ defined     
else_jump @Carsinarea  
jump @Continue


:Pedsinarea
wait 0
 0AF8: samp add_message_to_chat "{44FF44}[Streamslapper] {FF4444}Error:{FFFFFF} There is no players to slap.  " color 12517890    
0AD1: "~R~There is not any players streamed.." 1000 
wait 1000
Jump @Spexx_0

:Carsinarea
wait 0
0AF8: samp add_message_to_chat "{44FF44}[Streamslapper] {FF4444}Error:{FFFFFF} You must have cars streamed to slap people.  " color 12517890    
0AD1: "~R~There is not any cars streamed.." 1000 
wait 1000
Jump @Spexx_0


 
:AIC_GETACTOR
0395: clear_area 1 at 0@ 1@ 2@ radius 100000.0
0006: 16@ = 305868
0006: 5@ = @AIC_TESTACTORHANDLE
0006: 6@ = 1988
0002: jump @AIC_STARTSEARCH
:AIC_GETOBJECT
0006: 16@ = 305871
0006: 17@ = @AIC_TESTOBJECTHANDLE
0006: 20@ = 412
:AIC_GETVEHICLE
0006: 16@ = 305869
0006: 17@ = @AIC_TESTVEHICLEHANDLE
0006: 18@ = -1
0006: 20@ = 2584
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @AIC_STARTSEARCH
00DF:   actor $PLAYER_ACTOR driving
004D: jump_if_false @AIC_STARTSEARCH
03C0: 18@ = actor $PLAYER_ACTOR car
0002: jump @AIC_STARTSEARCH
:AIC_STARTSEARCH
008B: 16@ = &0(16@,1i) // CPool*
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 16@ + 8 )^ = 7@  // CPool.Size
0A8D: 11@ = read_memory 16@ size 4 virtual_protect 0        // CPool.pUnits
0006: 26@ = -1
0006: 10@ = 0
:AIC_SEARCHLOOPMAIN
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 11@ + 20 )^ = 4@  // xyz*
8039:   not  4@ == 0
004D: jump_if_false @AIC_SEARCHLOOPNEXT
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 48 )^ = 12@  // x
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 52 )^ = 13@  // y
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 56 )^ = 14@  // z
050A: 15@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 12@ 13@ 14@
0025:   3@ > 15@ // (float)
004D: jump_if_false @AIC_SEARCHLOOPNEXT
0085: 26@ = 10@ // (int) // counter
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 16@ + 4 )^ = 4@ // CPool.flags
005A: 4@ += 26@ // (int)
0A8D: 4@ = read_memory 4@ size 1 virtual_protect 0
0012: 26@ *= 256
005A: 26@ += 4@ // (int)
0002: jump 5@
:AIC_TESTACTORHANDLE
056D:   is 26@ valid_actor_handle
004D: jump_if_false @AIC_NOHANDLE
00D6: if or
003C:   $PLAYER_ACTOR == 26@ // (int)
0118:   actor 26@ dead
004D: jump_if_false @AIC_NEWSEARCHRADIUS
0002: jump @AIC_NOHANDLE
:AIC_TESTOBJECTHANDLE
//0001: wait 0
83CA:   not object 26@ exists
004D: jump_if_false @AIC_NEWSEARCHRADIUS
:AIC_TESTVEHICLEHANDLE
056E:   is 26@ valid_vehicle_handle
004D: jump_if_false @AIC_NOHANDLE
00D6: if or
003B:   $PLAYER_ACTOR == 26@ // (int)
0119:   car 26@ wrecked
004D: jump_if_false @AIC_NEWSEARCHRADIUS
0002: jump @AIC_NOHANDLE
:AIC_NOHANDLE
0006: 26@ = -1
0002: jump @AIC_SEARCHLOOPNEXT
:AIC_NEWSEARCHRADIUS
if
056D:   actor 26@ defined
jf @AIC_NOHANDLE                                        
0085: 3@ = 15@
:AIC_SEARCHLOOPNEXT
005A: 11@ += 6@ // (int)
000A: 10@ += 1
002D:   10@ >= 7@ // (int)
004D: jump_if_false @AIC_SEARCHLOOPMAIN
0051: return
:AIC_READMEMOFFSET
0A8E: 0@ = 0@ + 1@ // int
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0AB2: ret 1 0@




:Label949
28@ = 640.0 
0A8D: 29@ = read_memory 12010640 size 4 virtual_protect 0 
29@ += 4 
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0 
30@ = 0 

:Label999
0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0 
29@ += 1 
if and
  31@ >= 0 
  128 > 31@ 
else_jump @Label1254 
005A: 31@ += 30@ // (int) 
if 
056D:   actor 31@ defined 
else_jump @Label1254 
if 
803C:   not  $PLAYER_ACTOR == 31@ // (int) 
else_jump @Label1254 
04C4: store_coords_to 27@ 26@ 25@ from_actor 31@ with_offset 0.0 0.0 0.0 
068D: get_camera_position_to 24@ 23@ 22@ 
if and
02CB:   actor 31@ bounding_sphere_visible 
06BD:   no_obstacles_between 27@ 26@ 25@ and 24@ 23@ 22@ solid 1 car 0 actor 0 object 1 particle 0 
else_jump @Label1254 
call @Label1314 3 27@ 26@ 25@ 24@ 23@ 
0509: 22@ = distance_between_XY 339.0 179.0 and_XY 24@ 23@ 
if 
0035:   28@ >= 22@ // (float) 
else_jump @Label1254 
0087: 28@ = 22@ // (float) 
0087: 15@ = 31@ // (float) 

:Label1254
30@ += 256 
  30@ > 35584 
else_jump @Label999 
if 
056D:   actor 15@ defined 
else_jump @Label1304 
return_true 
jump @Label1306 

:Label1304
return_false 

:Label1306
ret 1 15@ 

:Label1314
0AC7: 14@ = var 0@ offset 
0AC7: 15@ = var 3@ offset 
0AC7: 16@ = var 6@ offset 
0AC7: 17@ = var 9@ offset 
0AA5: call 7392816 num_params 6 pop 6 0 0 17@ 16@ 15@ 14@  
12@ = 640.0 
13@ = 448.0 
0A8D: 14@ = read_memory 12677188 size 4 virtual_protect 0 
0A8D: 15@ = read_memory 12677192 size 4 virtual_protect 0 
0093: 14@ = integer 14@ to_float 
0093: 15@ = integer 15@ to_float 
0073: 12@ /= 14@ // (float) 
0073: 13@ /= 15@ // (float) 
006B: 3@ *= 12@ // (float) 
006B: 4@ *= 13@ // (float) 
ret 2 3@ 4@
 

lol7

Active member
Joined
Apr 3, 2013
Messages
120
Reaction score
1
Location
Blumenau, Santa Catarina, Brasil
MasterXVQ link said:
Hello again.
I know it is posible to define the nearest player on foot.
Someone could help me how can i do that?
Thanks.

First use this, for example:

Code:
:NONAME_20
wait 0
if
0AB0:   key_pressed 121
else_jump @NONAME_20
jump @NONAME_30

//-----MAIN-----

:NONAME_30
wait 0
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)  // SEARCHING START POS //-----MAIN-----
3@ = 3000.0 // SEARCH RADIUS //-----MAIN-----
gosub @AIC_GETACTOR  // GET ACTOR WICH IS AT POS 0@ 1@ 2@ TO 26@ //-----MAIN-----
if  //-----MAIN-----
056D:   actor 26@ defined //-----MAIN-----
else_jump @NONAME_30
jump @NONAME_40

Now you can define many player like what you are requesting (put at the final line in your cleo script (source from slapall.cs)):

Code:
:AIC_GETACTOR
0395: clear_area 1 at 0@ 1@ 2@ radius 100000.0
0006: 16@ = 305868
0006: 5@ = @AIC_TESTACTORHANDLE
0006: 6@ = 1988
0002: jump @AIC_STARTSEARCH
:AIC_GETOBJECT
0006: 16@ = 305871
0006: 17@ = @AIC_TESTOBJECTHANDLE
0006: 20@ = 412
:AIC_GETVEHICLE
0006: 16@ = 305869
0006: 17@ = @AIC_TESTVEHICLEHANDLE
0006: 18@ = -1
0006: 20@ = 2584
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @AIC_STARTSEARCH
00DF:   actor $PLAYER_ACTOR driving
004D: jump_if_false @AIC_STARTSEARCH
03C0: 18@ = actor $PLAYER_ACTOR car
0002: jump @AIC_STARTSEARCH
:AIC_STARTSEARCH
008B: 16@ = &0(16@,1i) // CPool*
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 16@ + 8 )^ = 7@  // CPool.Size
0A8D: 11@ = read_memory 16@ size 4 virtual_protect 0        // CPool.pUnits
0006: 26@ = -1
0006: 10@ = 0
:AIC_SEARCHLOOPMAIN
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 11@ + 20 )^ = 4@  // xyz*
8039:   not  4@ == 0
004D: jump_if_false @AIC_SEARCHLOOPNEXT
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 48 )^ = 12@  // x
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 52 )^ = 13@  // y
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 56 )^ = 14@  // z
050A: 15@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 12@ 13@ 14@
0025:   3@ > 15@ // (float)
004D: jump_if_false @AIC_SEARCHLOOPNEXT
0085: 26@ = 10@ // (int) // counter
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 16@ + 4 )^ = 4@ // CPool.flags
005A: 4@ += 26@ // (int)
0A8D: 4@ = read_memory 4@ size 1 virtual_protect 0
0012: 26@ *= 256
005A: 26@ += 4@ // (int)
0002: jump 5@
:AIC_TESTACTORHANDLE
056D:   is 26@ valid_actor_handle
004D: jump_if_false @AIC_NOHANDLE
00D6: if or
003C:   $PLAYER_ACTOR == 26@ // (int)
0118:   actor 26@ dead
004D: jump_if_false @AIC_NEWSEARCHRADIUS
0002: jump @AIC_NOHANDLE
:AIC_TESTOBJECTHANDLE
//0001: wait 0
83CA:   not object 26@ exists
004D: jump_if_false @AIC_NEWSEARCHRADIUS
:AIC_TESTVEHICLEHANDLE
056E:   is 26@ valid_vehicle_handle
004D: jump_if_false @AIC_NOHANDLE
00D6: if or
003B:   $PLAYER_ACTOR == 26@ // (int)
0119:   car 26@ wrecked
004D: jump_if_false @AIC_NEWSEARCHRADIUS
0002: jump @AIC_NOHANDLE
:AIC_NOHANDLE
0006: 26@ = -1
0002: jump @AIC_SEARCHLOOPNEXT
:AIC_NEWSEARCHRADIUS
if
056D:   actor 26@ defined
jf @AIC_NOHANDLE                                        
0085: 3@ = 15@
:AIC_SEARCHLOOPNEXT
005A: 11@ += 6@ // (int)
000A: 10@ += 1
002D:   10@ >= 7@ // (int)
004D: jump_if_false @AIC_SEARCHLOOPMAIN
0051: return
:AIC_READMEMOFFSET
0A8E: 0@ = 0@ + 1@ // int
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0AB2: ret 1 0@

In this example of a cleo script on how to use it, you can throw player away from you:

Code:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

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

:NONAME_20
wait 0
if
0AB0:   key_pressed 121
else_jump @NONAME_20
jump @NONAME_30

:NONAME_30
wait 0
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)  // SEARCHING START POS
3@ = 3000.0 // SEARCH RADIUS
gosub @AIC_GETACTOR  // GET ACTOR WICH IS AT POS 0@ 1@ 2@ TO 26@
if 
056D:   actor 26@ defined
else_jump @NONAME_30
jump @NONAME_40

:NONAME_40 
if
   Actor.Driving(26@)
jf @NONAME_20 
$SATAN = Actor.CurrentCar(26@)
$MR_S0BEIT = Actor.CurrentCar($PLAYER_ACTOR)
jump @NONAME_99 

:NONAME_99
if
056E:   car $MR_S0BEIT defined 
056E:   car $SATAN defined 
jump @NONAME_120 

:NONAME_120
wait 0 
if 
   not Actor.InCar($PLAYER_ACTOR, $SATAN)
jf @NONAME_20 
if 
    Actor.InCar($PLAYER_ACTOR, $MR_S0BEIT)
jf @NONAME_20  
02E3: -1888@ = car $MR_S0BEIT speed
036A: put_actor $PLAYER_ACTOR in_car $SATAN
036A: put_actor $PLAYER_ACTOR in_car $SATAN
036A: put_actor $PLAYER_ACTOR in_car $SATAN  
0407: store_coords_to 8@ 9@ 10@ from_car $MR_S0BEIT with_offset 0.0 0.0 15.0 
Car.PutAt($SATAN, 8@, 9@, 10@)
0731: set_car $SATAN y_angle_to 135
//07DB: set_car $MR_S0BEIT rotation_velocity_XYZ 0.0 1.0 -4000.0 through_center_of_mass
Car.SetSpeedInstantly($SATAN, 600.0)  
wait 100 
//04C4: store_coords_to 2@ 3@ 4@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 
036A: put_actor $PLAYER_ACTOR in_car $MR_S0BEIT
036A: put_actor $PLAYER_ACTOR in_car $MR_S0BEIT
036A: put_actor $PLAYER_ACTOR in_car $MR_S0BEIT
wait 1
Car.SetSpeedInstantly($MR_S0BEIT, -1888@)
jump @NONAME_20  

:AIC_GETACTOR
0395: clear_area 1 at 0@ 1@ 2@ radius 100000.0
0006: 16@ = 305868
0006: 5@ = @AIC_TESTACTORHANDLE
0006: 6@ = 1988
0002: jump @AIC_STARTSEARCH
//:AIC_GETOBJECT
//0006: 16@ = 305871
//0006: 17@ = @AIC_TESTOBJECTHANDLE
//0006: 20@ = 412
//:AIC_GETVEHICLE
//0006: 16@ = 305869
//0006: 17@ = @AIC_TESTVEHICLEHANDLE
//0006: 18@ = -1
//0006: 20@ = 2584
//0256:   player $PLAYER_CHAR defined
//004D: jump_if_false @AIC_STARTSEARCH
//00DF:   actor $PLAYER_ACTOR driving
//004D: jump_if_false @AIC_STARTSEARCH
//03C0: 18@ = actor $PLAYER_ACTOR car
//0002: jump @AIC_STARTSEARCH
:AIC_STARTSEARCH      
008B: 16@ = &0(16@,1i) // CPool*
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 16@ + 8 )^ = 7@  // CPool.Size
0A8D: 11@ = read_memory 16@ size 4 virtual_protect 0        // CPool.pUnits
0006: 26@ = -1
0006: 10@ = 0
:AIC_SEARCHLOOPMAIN
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 11@ + 20 )^ = 4@  // xyz*
8039:   not  4@ == 0
004D: jump_if_false @AIC_SEARCHLOOPNEXT
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 48 )^ = 12@  // x
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 52 )^ = 13@  // y
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 56 )^ = 14@  // z
050A: 15@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 12@ 13@ 14@
0025:   3@ > 15@ // (float)
004D: jump_if_false @AIC_SEARCHLOOPNEXT
0085: 26@ = 10@ // (int) // counter
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 16@ + 4 )^ = 4@ // CPool.flags
005A: 4@ += 26@ // (int)
0A8D: 4@ = read_memory 4@ size 1 virtual_protect 0
0012: 26@ *= 256
005A: 26@ += 4@ // (int)
0002: jump 5@
:AIC_TESTACTORHANDLE
056D:   is 26@ valid_actor_handle
004D: jump_if_false @AIC_NOHANDLE
00D6: if or
003C:   $PLAYER_ACTOR == 26@ // (int)
0118:   actor 26@ dead
004D: jump_if_false @AIC_NEWSEARCHRADIUS
0002: jump @AIC_NOHANDLE
//:AIC_TESTOBJECTHANDLE
//0001: wait 0
//83CA:   not object 26@ exists
//004D: jump_if_false @AIC_NEWSEARCHRADIUS
//:AIC_TESTVEHICLEHANDLE
//056E:   is 26@ valid_vehicle_handle
//004D: jump_if_false @AIC_NOHANDLE
//00D6: if or
//003B:   $PLAYER_ACTOR == 26@ // (int)
//0119:   car 26@ wrecked
///004D: jump_if_false @AIC_NEWSEARCHRADIUS
//0002: jump @AIC_NOHANDLE
:AIC_NOHANDLE
0006: 26@ = -1
0002: jump @AIC_SEARCHLOOPNEXT
:AIC_NEWSEARCHRADIUS
if
056D:   actor 26@ defined
jf @AIC_NOHANDLE                                        
0085: 3@ = 15@
:AIC_SEARCHLOOPNEXT
005A: 11@ += 6@ // (int)
000A: 10@ += 1
002D:   10@ >= 7@ // (int)
004D: jump_if_false @AIC_SEARCHLOOPMAIN
0051: return
:AIC_READMEMOFFSET
0A8E: 0@ = 0@ + 1@ // int
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0AB2: ret 1 0@
 
Status
Not open for further replies.
Top