CLEO Help Cant put current player into car

CLEO related
Status
Not open for further replies.

Hysterics

Member
Joined
Dec 25, 2013
Messages
9
Reaction score
0
Hello
I am trying to create a simple cleo script that puts the current player to someone else and makes it jump.
but im haveing some troubles makeing it by myself.
I have looked into opcode.exe's scripts but they very ... :D :D:D

my current script looks like this
Code:
{$CLEO .cs}

//-------------MAIN---------------
03A4: name_thread "WEATHER2" 
0001: wait 1000 ms 

:WEATHER_16
0001: wait 0 ms
00D6: if
0256: player $PLAYER_CHAR defined
jf @WEATHER_16 
jump @driving_quastion

:driving_quastion
wait 1000 ms
if
00DF:  actor $PLAYER_ACTOR driving
004D: jump_if_false @WEATHER_16

:xaxaxaxactionxaxaxa
wait 1000 ms
03C0: 30@ = actor 9@ car 
0006: 4@ = -1 // Any car ?
0006: 10@ = 10000.0 // Radius ?
03C0: 1@ = actor $PLAYER_ACTOR car
if and
0AB0:  key_pressed 0xD
0AB0:  key_pressed 0x6B
004D: jump_if_false @driving_quastion
//-------------ACTION--------------------------------------
00BA: show_text_styled GXT 'BEEFY' time 1000 style 2  // Beefy Baron
036A: put_actor $PLAYER_ACTOR in_car 4@
//-------------ACTION--------------------------------------/
jump @driving_quastion

oh and btw, i almost can gurantee myself that
Code:
0006: 4@ = -1 // Any car ?
means ANY car? or im wrong??

Regards
 

Z0DY

Well-known member
Joined
Feb 20, 2013
Messages
225
Reaction score
0
nearest vehicle -> 0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
0@ is the vehicle
 

Hysterics

Member
Joined
Dec 25, 2013
Messages
9
Reaction score
0
nearest vehicle -> 0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
0@ is the vehicle
Not very clear for me.
if i put this code noting happends

the current part of the code is like;

Code:
:key_pressed
0AB0:  key_pressed 191
004D: jump_if_false @WEATHER_16
00BA: show_text_styled GXT 'BEEFY' time 1000 style 2  // Beefy Baron
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 1@ closest_ped_to 2@
 

Hysterics

Member
Joined
Dec 25, 2013
Messages
9
Reaction score
0
Code:
if
056E: car 1@ defined
then
036A: put_actor $PLAYER_ACTOR in_car 4@
end
i dont get it...
How should make this code put the player into a any car nearby?
And also, those 1@ and 4@, i dont get them either.
I even made smth like this;

1@ = #NRG500
and the wrote the code like exactly how u said, but replaced the variables to 1@, noting happends/crashes
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 1@ closest_ped_to 2@

1@ = car handle for the nearest car

if // condition
056E: car 1@ defined (if the car is there(not wrecked, respawned etc.)
then // if above is true
036A: put_actor $PLAYER_ACTOR in_car 1@ // puts the player in the car.
end
 

Hysterics

Member
Joined
Dec 25, 2013
Messages
9
Reaction score
0
Thank you very much.
i try to continue by my own now, but it seems im stuck again.
I will reply if i still cant figure out how should i continue...
 
Status
Not open for further replies.
Top