Blaconix_x
Member
- Joined
- Jul 1, 2015
- Messages
- 8
- Reaction score
- 0
I know 0 about cleo coding but I tried to make a script that attaches the nearest trailer. It doesn't really work, if I remove the check for the car model it just attaches my car to my car. Are trailers considered cars?
Here's my code:
Thanks!
Here's my code:
Code:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}
//-------------MAIN---------------
thread "TRAILER_ATTACH"
:ATTACH_10
wait 0
if
00DF: actor $PLAYER_ACTOR driving
Actor.Driving($PLAYER_ACTOR)
:ATTACH_28
wait 0
if and
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 8.0 0.0
key_down 220
else_jump @ATTACH_10
if and
0AE2: $CAR = random_vehicle_near_point 1@ 2@ 3@ in_radius 10.0 find_next 0 pass_wrecked 0 //IF and SET
0137: car $CAR id == 435
else_jump @ATTACH_10
03C0: $2197 = actor $PLAYER_ACTOR car
0683: attach_car $CAR to_car $2197 with_offset 0.0 -4.6 0.65 rotation 15.0 0.0 0.0
wait 500
jump @ATTACH_28
Thanks!