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

Status
Not open for further replies.

mpol77

Well-Known Member
Joined
Oct 24, 2018
Messages
64
Likes
7
Points
23
#1
:ToggleCollide
[email protected] = Actor.CurrentCar($PLAYER_ACTOR)
0A8D: [email protected] = read_memory 0xB74494 size 4 virtual_protect 0
[email protected] += 0x4
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0
for [email protected] = 0 to 27904 step 0x100
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0
000A: [email protected] += 0x1
if and
0029: [email protected] >= 0x00
001B: 0x80 > [email protected]
// ??
then
005A: [email protected] += [email protected]
099A: set_car [email protected] collision_detection [email protected]
end
end
0AB2: ret 0

how do u exactly make it so the current car that you're getting ([email protected]) is different from [email protected]? 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
325
Likes
25
Points
33
#2
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.
 
OP
OP
M

mpol77

Well-Known Member
Joined
Oct 24, 2018
Messages
64
Likes
7
Points
23
#4
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

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

thanks a bunch, i'll check
 

KamikazeSripterul

Well-Known Member
Joined
Jun 30, 2019
Messages
325
Likes
25
Points
33
#5
Status
Not open for further replies.
Top