:GetTrailerAttachedToCar
{
Parameters:
Passed:
0@ - Car handle
Result:
1@ - Attached trailer handle
Example:
if 0AB1: call_scm_func @GetTrailerAttachedToCar 1 from car 0@ store_to 1@ // IF and SET
}
0A8D: 3@ = read_memory 0xB74494 size 4 virtual_protect 0
000A: 3@ += 0x4
0A8D: 3@ = read_memory 3@ size 4 virtual_protect 0
for 1@ = 0x0 to 0x6D00 step 0x100
0A8D: 2@ = read_memory 3@ size 1 virtual_protect 0
000A: 3@ += 0x1
if and
0029: 2@ >= 0x0
001B: 0x80 > 2@
then
005A: 2@ += 1@ // (int)
if
07AB: car 0@ has_attached_trailer 2@
then
0485: return_true
break
end
end
end
0AB2: ret 1 2@
:GetTrailerAttachedToCar
{
Parameters:
Passed:
0@ - Car handle
Result:
1@ - Attached trailer handle
Example:
if 0AB1: call_scm_func @GetTrailerAttachedToCar 1 from car 0@ store_to 1@
}
0A97: 1@ = car 0@ struct
1@ += 1224
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
if
not 1@ == 0
then
0AEB: 1@ = car_struct 1@ handle
0485: return_true
end
0AB2: ret 1 1@
pepeelpubero link said:I found this on another site, but i don't know how to use and if it works like you want. Wait or tell this to a moderator.
Code::GetTrailerAttachedToCar { Parameters: Passed: 0@ - Car handle Result: 1@ - Attached trailer handle Example: if 0AB1: call_scm_func @GetTrailerAttachedToCar 1 from car 0@ store_to 1@ // IF and SET } 0A8D: 3@ = read_memory 0xB74494 size 4 virtual_protect 0 000A: 3@ += 0x4 0A8D: 3@ = read_memory 3@ size 4 virtual_protect 0 for 1@ = 0x0 to 0x6D00 step 0x100 0A8D: 2@ = read_memory 3@ size 1 virtual_protect 0 000A: 3@ += 0x1 if and 0029: 2@ >= 0x0 001B: 0x80 > 2@ then 005A: 2@ += 1@ // (int) if 07AB: car 0@ has_attached_trailer 2@ then 0485: return_true break end end end 0AB2: ret 1 2@
OR
Code::GetTrailerAttachedToCar { Parameters: Passed: 0@ - Car handle Result: 1@ - Attached trailer handle Example: if 0AB1: call_scm_func @GetTrailerAttachedToCar 1 from car 0@ store_to 1@ } 0A97: 1@ = car 0@ struct 1@ += 1224 0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0 if not 1@ == 0 then 0AEB: 1@ = car_struct 1@ handle 0485: return_true end 0AB2: ret 1 1@
OR use s0beit with Keep trailer attached, i don't know if it's working or not, i don't use that but i know there is something like that.
That function returns the attached trailer ID, lemme try find one.pepeelpubero link said:I found this on another site, but i don't know how to use and if it works like you want. Wait or tell this to a moderator.
Code::GetTrailerAttachedToCar { Parameters: Passed: 0@ - Car handle Result: 1@ - Attached trailer handle Example: if 0AB1: call_scm_func @GetTrailerAttachedToCar 1 from car 0@ store_to 1@ // IF and SET } 0A8D: 3@ = read_memory 0xB74494 size 4 virtual_protect 0 000A: 3@ += 0x4 0A8D: 3@ = read_memory 3@ size 4 virtual_protect 0 for 1@ = 0x0 to 0x6D00 step 0x100 0A8D: 2@ = read_memory 3@ size 1 virtual_protect 0 000A: 3@ += 0x1 if and 0029: 2@ >= 0x0 001B: 0x80 > 2@ then 005A: 2@ += 1@ // (int) if 07AB: car 0@ has_attached_trailer 2@ then 0485: return_true break end end end 0AB2: ret 1 2@
OR
Code::GetTrailerAttachedToCar { Parameters: Passed: 0@ - Car handle Result: 1@ - Attached trailer handle Example: if 0AB1: call_scm_func @GetTrailerAttachedToCar 1 from car 0@ store_to 1@ } 0A97: 1@ = car 0@ struct 1@ += 1224 0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0 if not 1@ == 0 then 0AEB: 1@ = car_struct 1@ handle 0485: return_true end 0AB2: ret 1 1@
OR use s0beit with Keep trailer attached, i don't know if it's working or not, i don't use that but i know there is something like that.