CLEO Help stuck - Flipping cars

CLEO related
Status
Not open for further replies.

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
hello i got stuckat this code , the code is about making the car flip if it's upside down so my code is this:


Code:
{$CLEO .cs}
thread 'flip' 

:start //the start         
wait 10
00D9: $car = actor $PLAYER_ACTOR car
if
00DB:   actor $PLAYER_ACTOR in_car $car
0AB0: KEY_PRESSING: 119 // F8
jf @start     
018F:   car $car flipped_for_2_seconds // or  this code 01F4:   car $car flipped 
jump @start


but the code doesn't work , what is wrong with it?
 

mbcool

Active member
Joined
May 14, 2013
Messages
49
Reaction score
0
Now it works :) :):)
But the activation key is 1 now. (I changed it for testing)
You can edit it on yourself.

Code:
{$CLEO .cs}
thread "FLIPSHIT"
:MAIN
wait 0

:start //the start         
wait 10
if and
Player.Defined($PLAYER_ACTOR)
Actor.Driving($PLAYER_ACTOR)
jf @start
1@ = Actor.CurrentCar($PLAYER_ACTOR)
if
0AB0:   key_pressed 49
jf @start
0ACD: show_text_highpriority "~G~Flipped!" time 2000    
Car.StorePos(1@,2@,3@,4@)
Car.PutAt(1@,2@,3@,4@)
wait 1000
jump @start
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
hmmm there is something wrong with this line:
1@ = Actor.CurrentCar($PLAYER_ACTOR)
doesn't work "Incorrect expression 1@ = Actor.CurrentCar($PLAYER_ACTOR).
One of the variables has unknown type, or operands are incompatible." ^_^
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
well, since my stupid internet fucked up , i blocked for much time ,,well, i think I've fixed it so far anyway the remain code that you added is just crazy
{$CLEO .cs}
thread "FLIPcar"
:MAIN
wait 0

:start //the start
wait 10
if and
Player.Defined($PLAYER_ACTOR)
Actor.Driving($PLAYER_ACTOR)
Car.Defined($mycar) //define the car
jf @start
00D9: $mycar = actor $PLAYER_ACTOR car
// not 1@ = Actor.CurrentCar($PLAYER_ACTOR)
if
0AB0: key_pressed 120
jf @start
0ACD: show_text_highpriority "~G~Flipped!" time 2000
Car.StorePos(1@,2@,3@,4@) //this
Car.PutAt(1@,2@,3@,4@) //and this ,, what is the point of you store car position and you teleport to the same
place with nothing new o_O ,, i think this code is wrong
wait 1000
jump @start
 

mbcool

Active member
Joined
May 14, 2013
Messages
49
Reaction score
0
well, since my stupid internet fucked up , i blocked for much time ,, anyway the remain code that you added is just crazy
{$CLEO .cs}
thread "FLIPcar"
:MAIN
wait 0

:start //the start
wait 10
if and
Player.Defined($PLAYER_ACTOR)
Actor.Driving($PLAYER_ACTOR)
Car.Defined($mycar) /define the car
jf @start
00D9: $mycar = actor $PLAYER_ACTOR car
// not 1@ = Actor.CurrentCar($PLAYER_ACTOR)
No. you dont need a global variabel
if
0AB0: key_pressed 120
jf @start
0ACD: show_text_highpriority "~G~Flipped!" time 2000
Car.StorePos(1@,2@,3@,4@) //this
Car.PutAt(1@,2@,3@,4@) //and this ,, what is the point of you store car position and you teleport to the same
place with nothing new o_O ,, i think this code is wrong
When your car is "on the wrong side" you will be placed on your wheels. (Turned arround ;) ;);)
Its not wrong.

wait 1000
jump @start
 
Status
Not open for further replies.
Top