CLEO Help Compare PLAYERACTOR's car handle + Check if vehicle has a driver

CLEO related
Status
Not open for further replies.

mpol77

Active member
Joined
Oct 24, 2018
Messages
66
Reaction score
6
:ToggleCollide
1@ = Actor.CurrentCar($PLAYER_ACTOR)
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@
099A: set_car 31@ collision_detection 0@
end
end
0AB2: ret 0

how do u exactly make it so the current car that you're getting (31@) is different from 1@? sanny won't let me compile it my way so im asking
how do u check if a vehicle has a driver btw? i have the forallcars loop, that's all im missing
 

KamikazeSripterul

Well-known member
Joined
Jun 30, 2019
Messages
353
Reaction score
23
Check if each player from the server is driving and get the car id. Then get the car that you are in. Finally compare if your car matches with any that the other players drive.
 

mpol77

Active member
Joined
Oct 24, 2018
Messages
66
Reaction score
6
Check if each player from the server is driving and get the car id. Then get the car that you are in. Finally compare if your car matches with any that the other players drive.

yeah that's pretty much what i had in mind, but i have no clue on how to compare cars handles

1@ = Actor.CurrentCar($PLAYER_ACTOR)
2@ == 1@ <- this doesn't work, assuming you've got the 2@ from the ForAllCars loop http://ugbase.eu/index.php?threads/snippet-forallcars.2769/


thanks a bunch, i'll check
 
Status
Not open for further replies.
Top