[SNIPPET] Restart cleo

So.. you're making a CLEO and hate it to restart your Gta Sa all the time to test the new .cs?

Well, here's the solution:
0AB1: @RESTART 1 WITH_KEY 88 // KEY_X

Paste that function in the main loop of your cleo, now when u press X ingame, the new .cs gets loaded.

++ RENAME YOUR CLEO MOD TO: TEST.CS


Code:
:RESTART
IF
0AB0: 0@
THEN
    REPEAT
        WAIT 0
        PRINT "~R~RESTART: ~w~TEST.CS" 100
    UNTIL 8AB0: 0@
0A92: RESTART "TEST.CS"
004E: STOP THIS CLEO
END
0AB2: 0
 

TheZeRots

Expert
Joined
Dec 21, 2013
Messages
1,247
Reaction score
1
Re: Restart cleo

Now if someone would make that for CLEO.asi so all CLEO scripts would get reloaded...  :me_gusta:

[member=2]0x688[/member] pls

Anyway, Opcud, I like what I see... +69 for u

----
Opcode 8AB0 -> Where did you get that opcode from? Isn't it supposed to be 0AB0?
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Re: Restart cleo

Mr.Ze link said:
Now if someone would make that for CLEO.asi so all CLEO scripts would get reloaded...  :me_gusta:

[member=2]0x688[/member] pls

Anyway, Opcud, I like what I see... +69 for u

----
Opcode 8AB0 -> Where did you get that opcode from? Isn't it supposed to be 0AB0?
If you want to check if the condition isn't done, like... if you are not pressing key 9 (0AB0: 57) you must change the first number (0) to 8, like this:

if
8AB0: 57
then
0AF9: "I AM NOT PRESSING KEY 9!"
 

TheZeRots

Expert
Joined
Dec 21, 2013
Messages
1,247
Reaction score
1
Re: Restart cleo

TH3RM4L link said:
[quote author=Mr.Ze link=topic=8416.msg48522#msg48522 date=1405669476]
Now if someone would make that for CLEO.asi so all CLEO scripts would get reloaded...  :me_gusta:

[member=2]0x688[/member] pls

Anyway, Opcud, I like what I see... +69 for u

----
Opcode 8AB0 -> Where did you get that opcode from? Isn't it supposed to be 0AB0?
If you want to check if the condition isn't done, like... if you are not pressing key 9 (0AB0: 57) you must change the first number (0) to 8, like this:

if
8AB0: 57
then
0AF9: "I AM NOT PRESSING KEY 9!"
[/quote]
Oh, yeah, didn't even realise...

But that can be done with "not" lol
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Re: Restart cleo

Mr.Ze link said:
[quote author=TH3RM4L link=topic=8416.msg48524#msg48524 date=1405670466]
[quote author=Mr.Ze link=topic=8416.msg48522#msg48522 date=1405669476]
Now if someone would make that for CLEO.asi so all CLEO scripts would get reloaded...  :me_gusta:

[member=2]0x688[/member] pls

Anyway, Opcud, I like what I see... +69 for u

----
Opcode 8AB0 -> Where did you get that opcode from? Isn't it supposed to be 0AB0?
If you want to check if the condition isn't done, like... if you are not pressing key 9 (0AB0: 57) you must change the first number (0) to 8, like this:

if
8AB0: 57
then
0AF9: "I AM NOT PRESSING KEY 9!"
[/quote]
Oh, yeah, didn't even realise...

But that can be done with "not" lol
[/quote] :imoverit: as far I know, "not" works only for checks like Actor.Driving, Actor.Stopped, etc. and replacing 0 with 8 is like a not for opcodes.
 

SamThapa

Active member
Joined
Jan 22, 2018
Messages
82
Reaction score
2
how about using 1 cleo script to restart any other cleo script by name like paintjob.cs like this i look every where got no luck
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,724
Solutions
2
Reaction score
113
how about using 1 cleo script to restart any other cleo script by name like paintjob.cs like this i look every where got no luck
There's this. Could probably be modified to auto "reload" every script in your CLEO folder however it's a bit buggy as it really only copies the script whereas this snippet is able to end the script so you don't have two running at once because you can only remotely end a script if you know it's thread name which could be anything so it may not be the filename of the .cs and some CLEOs aren't even given thread names.
 
Top