楼主您好,我对您的《坐上附近的载具cleo》做了一点小修改,解决了十米之内没有车的时候游戏会崩溃的问题。代码如下,您可以看一下:
{$CLEO .cs}
//-------------MAIN---------------
0000:
thread 'GETCAR'
:GETCAR_12
wait 50
if and
0256: player $PLAYER_CHAR defined
80E0: not player $PLAYER_CHAR driving
05EE: key_pressed 116 //VK_...
else_jump @GETCAR_12
0039: 0@ == -1 // @ == int
0054: store_player $PLAYER_CHAR position_to 1@ 2@ 3@
05F0: 0@ = random_vehicle_near_point 1@ 2@ 3@ in_radius 10.0 find_next 0 pass_wrecked 1 //IF and SET
if
8039: not 0@ == -1 // @ == int
else_jump @GETCAR_12
0369: put_player $PLAYER_CHAR in_car 0@
您可以随意使用或修改这些代码。我也是个cleo的初学者,有空一起交流啊!