Resource icon

CLEO Release [RELEASE] Position Saver

CLEO related
Status
Not open for further replies.

re]b0ot_

Active member
Joined
Jul 10, 2014
Messages
25
Reaction score
0
A CLEO script I made today for learning purposes.
This script allows you save position and load your last saved position.
Useful in stunt challenges, parkours, etc.

Usage:
Type 'P[' in-game like singleplayer cheat to save position.
Type 'P]' in-game like singleplayer cheat to load position.

Code:
{$CLEO .cs}

0000: NOP

0@ = -65536
1@ = -65536
2@ = -65536
3@ = -65536

:SAVEPOS_1
wait 0
if and
    0ADC: test_cheat "P["
    Player.Defined($PLAYER_CHAR)
jf @SAVEPOS_2
00A0: store_actor $PLAYER_ACTOR position_to 0@ 1@ 2@
if
    Actor.Driving($PLAYER_ACTOR)
then
    4@ = Actor.CurrentCar($PLAYER_ACTOR)
    3@ = Car.Angle(4@)
else
    3@ = Actor.Angle($PLAYER_ACTOR)
end
0ACD: show_text_highpriority "~w~Position ~g~saved!" time 1337
wait 100
jump @SAVEPOS_2

:SAVEPOS_2
wait 0
if and
    0ADC: test_cheat "P]"
    Player.Defined($PLAYER_CHAR)
    not 0@ == -65536
    not 1@ == -65536
    not 2@ == -65536
    not 3@ == -65536
jf @SAVEPOS_1
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
if
    Actor.Driving($PLAYER_ACTOR)
then
    4@ = Actor.CurrentCar($PLAYER_ACTOR)
    Car.Angle(4@) = 3@
else
    Actor.Angle($PLAYER_ACTOR) = 3@
end
0373: set_camera_directly_behind_player
0ACD: show_text_highpriority "~w~Position ~b~loaded!" time 1337
wait 100
jump @SAVEPOS_1

Download at attachment:
 

Attachments

  • Saveposition.cs
    18.5 KB · Views: 95

PlasticBottle

Active member
Joined
Jul 13, 2016
Messages
162
Reaction score
1
Nice, can be useful sometimes, like for farming something.
Can you try to make it possible to save 2 positions? for example 'P[' and 'M[', so it can be even more useful
 
Status
Not open for further replies.
Top