[SNIPPET] ForAllCars

You want to make a CarCheat but cant get Cars? Use this snippet:

Code:
// FOR ALL CARS
// ALL CARS WILL EXPLODE BY PRESSING X
:X
wait 0
if
0AB0: X
jf [member=32140]x[/member]
0A8D: 29@ = read_memory 0xB74494 size 4 virtual_protect 0
29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 27904 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 CAR.
      020B: explode_car 31@ 
    end
end
// FOR ALLCARS END
jump [member=32140]x[/member]
 

Edd004

Active member
Joined
Mar 10, 2013
Messages
155
Reaction score
0
Re: ForAllCars

can you make one for all actors? :tongue: :tongue::tongue:
 

Monstercat

Well-known member
Joined
Feb 26, 2013
Messages
281
Reaction score
6
Re: ForAllCars

Nice :) :):)

I think I will find a good use for it :xD: :xD::xD:
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,719
Solutions
1
Reaction score
111
Re: ForAllCars

I made one which makes tires pop but it makes my tire's pop not cars around me how to make that stop?
 

ChristianIvann0939

Active member
Joined
Oct 30, 2013
Messages
68
Reaction score
0
Re: ForAllCars

An Error Showed when i Compiled it.

Sanny Builder 3 Compile Error
Not enough actual parameters. Expected 1 params.

How to fix that :( :(:( ?
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Re: ForAllCars

An Error Showed when i Compiled it.

Sanny Builder 3 Compile Error
Not enough actual parameters. Expected 1 params.

How to fix that :( :(:( ?

At which opcode?
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
Re: ForAllCars

TH3RM4L link said:
[quote author=blackHat link=topic=4241.msg44955#msg44955 date=1403453107]
this is synced  :me_gusta:?
:ppffh: :ppffh: :ppffh: Yeah, the snippet is synced :ppffh: :ppffh: :ppffh:
[/quote]

xD i meant others will see the cars affected if you somehow like teleported it or something like this?
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Re: ForAllCars

No. It's a snippet to get all the streamed cars handles. That's just an example.
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
Re: ForAllCars

handles  :me_gusta:?
this code will explode all cars , what handles?
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
Re: ForAllCars

springfield link said:
:face_palm:
i don't know about snippet at all lol
sorry for my dumbness  :me_gusta:
but i haven't used it before
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Re: ForAllCars

You don't need to know anything about snippets. Snippet = a small piece of information, code, fragment, extract.

A car handle = $car(31@), in which the car entity(handle) is stored.
 

J16D

Member
Joined
Jul 27, 2014
Messages
6
Reaction score
0
Re: ForAllCars

Edd004 link said:
can you make one for all actors?  :tongue: :tongue::tongue:
yes, is very easy, you only need to change the address
this is the address for peds 0xB74490

Code:
            {$I forallpeds}            
            if and
            056D:   actor ped defined
            803C:   not  $PLAYER_ACTOR == ped // (int)                  /// found an actor!
            then
                00A0: store_actor $PLAYER_ACTOR position_to 0@ 1@ 2@
                00A0: store_actor ped position_to 3@ 4@ 5@
                050A: 6@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 3@ 4@ 5@
                if
                5.0 > 6@                                                /// if distance between $player & the found_actor is less than 5.0
                then
                    0326: 20@ = create_actor ped fire                   /// yeea! burn! lol   // do something with found_actor
                    break
                end
            end
            {$I for_end}

the included file must be named like;  forallpeds
without extension, and must be saved in the same location of the compiled script
and it must contain;
Code:
/// forallpeds
const
    ped = 31@
end        
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: ped = read_memory 29@ size 1 virtual_protect 0
    000A: 29@ += 0x1
    if and
        0029:  ped >= 0x00 
        001B:  0x80 > ped
    then 
        005A: ped += 30@
and this is for the for_end  file;
Code:
/// for_end
end
end


and it's exacly the same for cars;
Code:
            {$I forallcars}
            if
            056E:   car veh defined                                     /// found a car!
            then
                00A0: store_actor $PLAYER_ACTOR position_to 0@ 1@ 2@
                00AA: store_car veh position_to 3@ 4@ 5@
                050A: 6@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 3@ 4@ 5@
                if
                7.0 > 6@                                                /// if distance between $player & the found_car is less than 7.0
                then
                    070C: explode_car veh // versionB                   /// yeea! burn! lol   /// do something with found_car
                    break
                end
            end
            {$I for_end}
Code:
/// forallcars
const
    veh = 31@
end
0A8D: 29@ = read_memory 0xB74494 size 4 virtual_protect 0
29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 27904 step 0x100
    0A8D: veh = read_memory 29@ size 1 virtual_protect 0
    000A: 29@ += 0x1
    if and
        0029: veh >= 0x00 
        001B: 0x80 > veh
    then
        005A: veh += 30@
for_end
Code:
/// for_end
end
end

you will save a lot of code when doing something like that. ;) it's cleaner and more readable ;)
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
Re: ForAllCars

Takari012 link said:
An Error Showed when i Compiled it.

Sanny Builder 3 Compile Error
Not enough actual parameters. Expected 1 params.

How to fix that :( :(:( ?
I had the same problem, just replaced the "X" with "49" for key 1 there:
Code:
0AB0: X
 

Kabal1

Active member
Joined
Mar 10, 2013
Messages
59
Reaction score
0
Re: ForAllCars

Opcode.eXe link said:
You want to make a CarCheat but cant get Cars? Use this snippet:

Code:
// FOR ALL CARS
// ALL CARS WILL EXPLODE BY PRESSING X
:X
wait 0
if
0AB0: X
jf @X
0A8D: 29@ = read_memory 0xB74494 size 4 virtual_protect 0
29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 27904 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 CAR.
      020B: explode_car 31@ 
    end
end
// FOR ALLCARS END
jump @X

I get crash if I copy this code in a .cs
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Re: ForAllCars

If you're new to cleo and need help using this snippet make a topic in the HELP section.
Don't make useless posts in this topic or any other from the snippet section.
Thanks.
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
Re: ForAllCars

for 30@ = 0 to 27904 step 0x100

What is 27904 about in this code?
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Re: ForAllCars

monday link said:
for 30@ = 0 to 27904 step 0x100

What is 27904 about in this code?

Every streamed car structure.
27904/256=109(GTA max car limit)
 

Grubitsh

Active member
Joined
Jul 28, 2014
Messages
104
Reaction score
0
Re: ForAllCars

I got a little problem.

I putted it in a loop, (without the explode instruction) with other instruction. It passes through it only 1 time. I have to restart the cleo (with your snippet restart cleo) to get it going in the loop again.

Any solution ?
 
Top