CLEO Help FoxHeaven.cs isn't working

CLEO related
Status
Not open for further replies.

lol7

Active member
Joined
Apr 3, 2013
Messages
120
Reaction score
1
Location
Blumenau, Santa Catarina, Brasil
Hi everybody. I wish I have this cleo working. I edited FoxHeaven.cs by Mr. S0beit, but I'm with no result from it.

This cleo is supposed to get the actor from around the $PLAYER_ACTOR, check if he's driving a car, gosub to have the modified camera directions, and throw the car in that way. However, it is not.

It was working(see the commented lines script in the cleo script), but then I started to make a big change in it and now it's not working. Could anyone of you guys help me out with it?

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_2
wait 0 
if and
    Player.Defined($PLAYER_ACTOR)
    Actor.Driving($PLAYER_ACTOR)
0AB0:   key_pressed 221
jf @NONAME_2 
wait 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 
            
                :NONAME_3
                wait 0
                0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0 
                29@ += 1 
                if and
                  31@ >= 0 
                  128 > 31@ 
                else_jump @NONAME_2 
                005A: 31@ += 30@ // (int) 
                if and
                803C:   not  $PLAYER_ACTOR == 31@ // (int) 
                02CB:   actor 31@ bounding_sphere_visible*/
                //0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 10@ closest_ped_to 31@
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
0AE1: $actor = random_actor_near_point 0@ 1@ 2@ in_radius 99999999.0 find_next 1 pass_deads 1
jump @NONAME_3

:NONAME_3
wait 0
if or
803C:   not  $PLAYER_ACTOR == $actor // (int)
803C:   not  $actor == $PLAYER_ACTOR // (int)
else_jump @NONAME_2  
jump @NONAME_40 

:NONAME_40
wait 0 
if 
056D:   actor $actor defined 
jf @NONAME_2 
if
   Actor.Driving($actor)
else_jump @NONAME_2
jump @NONAME_45

:NONAME_45
wait 0 
$SATAN = Actor.CurrentCar($actor)
$MR_S0BEIT = Actor.CurrentCar($PLAYER_ACTOR)
jump @NONAME_99

/*:NONAME_50
wait 0
if
056D:   actor $PLAYER_ACTOR defined
else_jump @NONAME_2
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
0AE1: $actor = random_actor_near_point 0@ 1@ 2@ in_radius 99999999.0 find_next 1 pass_deads 1 
jump @NONAME_3*/

:NONAME_99
if and
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_2 
if 
   Actor.InCar($PLAYER_ACTOR, $MR_S0BEIT)
jf @NONAME_2  
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 $SATAN with_offset 0.0 0.0 25.0 
            //Car.PutAt($SATAN, 8@, 9@, 10@)
            //0731: set_car $SATAN y_angle_to 280
            ////07DB: set_car $SATAN rotation_velocity_XYZ 4000.0 8800.0 -4000.0 through_center_of_mass
            //Car.SetSpeedInstantly($SATAN, 4000.0)  
gosub @NONAME_150 1 4.0 0@ 1@ 2@ 
07D5: set_car $SATAN velocity_in_direction_XYZ 0@ 1@ 2@ rotation_velocitiesXY 0.0 0.0 unk 0.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 
jump @NONAME_2

:NONAME_150
0087: 13@ = 0@ // (float) 
Car.StorePos($MR_S0BEIT, 20@, 21@, 22@)
068D: get_camera_position_to 24@ 25@ 26@ 
0063: 20@ -= 24@ // (float) 
0063: 21@ -= 25@ // (float) 
0063: 22@ -= 26@ // (float) 
Car.StorePos($MR_S0BEIT, 0@, 1@, 2@)
006B: 20@ *= 13@ // (float) 
006B: 21@ *= 13@ // (float) 
006B: 22@ *= 13@ // (float) 
005B: 22@ += 13@ // (float) 
005B: 0@ += 20@ // (float) 
005B: 1@ += 21@ // (float) 
005B: 2@ += 22@ // (float) 
Car.StorePos($MR_S0BEIT, 3@, 4@, 5@)
0063: 0@ -= 3@ // (float) 
0063: 1@ -= 4@ // (float) 
0063: 2@ -= 5@ // (float) 
return 3 0@ 1@ 2@
 

lol7

Active member
Joined
Apr 3, 2013
Messages
120
Reaction score
1
Location
Blumenau, Santa Catarina, Brasil
Opcode.eXe, even using the correct forms you show me, I don't know why, but whenever I use this opcode: "0AE1: $actor = random_actor_near_point 0@ 1@ 2@ in_radius 99999999.0 find_next 1 pass_deads 1", I can never get such actor.

I would be satisfied if one teach me how to get an actor around the $PLAYER_ACTOR while not using this opcode: 0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 10@ closest_ped_to 11@
 

lol7

Active member
Joined
Apr 3, 2013
Messages
120
Reaction score
1
Location
Blumenau, Santa Catarina, Brasil
springfield link said:
0AE1 doesn't work on SAMP, never did.
You could use http://ugbase.eu/snippets/for-all-peds/

Why this usage doesn't work? "SA:MP An exception occured".

Code:
:NONAME_30
wait 0
if
0AB0:   key_pressed 221
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@
0AB1: call_scm_func @NONAME_140 1 31@
if 
056D:   actor 31@ defined
else_jump @NONAME_30
jump @NONAME_40

:NONAME_40
wait 0 
if
   Actor.Driving(31@)
jf @NONAME_30 
$SATAN = Actor.CurrentCar(31@)
$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_30 
if 
   Actor.InCar($PLAYER_ACTOR, $MR_S0BEIT)
jf @NONAME_30  
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 25.0 
Car.PutAt($SATAN, 8@, 9@, 10@)
0731: set_car $SATAN y_angle_to 280
//07DB: set_car $MR_S0BEIT rotation_velocity_XYZ 0.0 1.0 -4000.0 through_center_of_mass
Car.SetSpeedInstantly($SATAN, 4000.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 
jump @NONAME_30

:NONAME_140
// FOR ALL PEDS     
0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 35584 step 0x100
    0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
    000A: 29@ += 0x1
    if and
        0029:  31@ >= 0x00 
        001B:  0x80 > 31@
    then 
        005A: 31@ += 30@
        // GOT THE PED.
    end
end
0AB2: ret 1 31@
 
Status
Not open for further replies.
Top