CLEO Help GetAllCarsAroundMe

CLEO related
Status
Not open for further replies.

ejexter

Well-known member
Joined
Feb 21, 2014
Messages
211
Reaction score
0
How i can make a script when all the cars around me teleported to one position??

Code:
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
Code:
// FOR ALL CARS SNIPPSET
// 
:X
wait 0
if
XXXX: X // check whatever you want
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.
      Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
     Car.PutAt(31@, 1@, 2@, 3@) // PUT ALL ...
    end
end
// FOR ALLCARS END
jump @X
 

ejexter

Well-known member
Joined
Feb 21, 2014
Messages
211
Reaction score
0
D.Kay link said:
Code:
// FOR ALL CARS SNIPPSET
// 
:X
wait 0
if
XXXX: X // check whatever you want
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.
      Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
     Car.PutAt(31@, 1@, 2@, 3@) // PUT ALL ...
    end
end
// FOR ALLCARS END
jump @X
Thanks  :urtheman:
If you have time, explain me how its works
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
Or you can use this one (it doesn't work for single player though)

Code:
for 0@ = 0 to 2000
    if 0AFF: samp 1@ = car_handle_by_samp_vehicle_id 0@
    then
    00AB: put_car 1@ at 2@ 3@ 4@  
    4@ += 2.0 
    end      
end

Changing the position a bit (4@ += 2.0) is quite important if you want to tp all the cars to one place, if you don't use it you'll get a one big lag
 

ejexter

Well-known member
Joined
Feb 21, 2014
Messages
211
Reaction score
0
monday link said:
Or you can use this one (it doesn't work for single player though)

Code:
for 0@ = 0 to 2000
    if 0AFF: samp 1@ = car_handle_by_samp_vehicle_id 0@
    then
    00AB: put_car 1@ at 2@ 3@ 4@  
    4@ += 2.0 
    end      
end

Changing the position a bit (4@ += 2.0) is quite important if you want to tp all the cars to one place, if you don't use it you'll get a one big lag
Thanks, This is better  :urtheman:
And ONE BIG LAG is the idea  :trollface:
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
It can actually lag other except you as long as you tp all the cars to one position, sync them, then tp them a bit higher with a little bit of space between them without syncing. The result is everyone lagging except you, I tried it yesterday on 2 servers and it worked well
 
Status
Not open for further replies.
Top