Hi,
I recieved a PM about a cleo tutorial which shows how to create a simple cleo file that activates when the user typed something on keyboard. So let's do it :challenge_accepted:
What to do uhm. :surprised: Oh! , a cleo mod that gives nitro to the car when typed "NOS".
Open Sanny Builder, hit Ctrl + N. Start with this :
Without this the cleo will not work. Then, add name to your cleo file like below :
Any name you want.
Now that we wrote this as total :
Now we start scripting. To start, put something that starts with ':', like ':<yourname>_01', ==>
I added "wait 0", because the cleo crashes if i don't use the "wait" command at the beginning. Now, we will put whatever we want. What do we want ? Put nitro to my car. Oh! so we must tell the script to define our current car. To do that we need it's opcode. To get it's opcode, we must search it from opcode list. Open the opcode list with ctlr + alt + 2, and search :
:forever_opcode_alone: but this will crash me if i am not driving a car. So first, we must put a condition for driving, then we must define the car, like this :
But oh ! We got another condition ! It's "if we typed NOS", so we must do ctrl + alt + 2 again, and then search "test cheat". We will get this
Now, the codes look like this :
From the beginning till the end, it means, "if i am driving and if i type "NOS" while driving, define my car."
We're on the right way :iknowwhatyoudid:
Now we gotta put nitro on our car pffh:
Let's search on opcode list :
:motherofgod_ Nothing appeared. Let's search add nitro pffh:
YES! :somuchwin: Let's use it pffh:
So the codes are all like this :
Type NOS to add nitro always :forever_hurra:
I recieved a PM about a cleo tutorial which shows how to create a simple cleo file that activates when the user typed something on keyboard. So let's do it :challenge_accepted:
What to do uhm. :surprised: Oh! , a cleo mod that gives nitro to the car when typed "NOS".
Open Sanny Builder, hit Ctrl + N. Start with this :
Code:
{$CLEO .cs}
Code:
thread 'NOS!'
Now that we wrote this as total :
Code:
{$CLEO .cs}
thread "NOS!"
Code:
:MAIN
wait 0
Hmm :me_gusta: We will use that !03C0: $2197 = actor $PLAYER_ACTOR car
Code:
03C0: $car = actor $PLAYER_ACTOR car
Code:
if
00DF: actor $PLAYER_ACTOR driving
else_jump @MAIN
03C0: $car = actor $PLAYER_ACTOR car
, we will use it pffh: Like this :0ADC: test_cheat "BLOWUP"
Code:
if and
0ADC: test_cheat "NOS"
00DF: actor $PLAYER_ACTOR driving
else_jump @MAIN
Code:
{$CLEO .cs}
thread "NOS!"
:MAIN
wait 0
if and
0ADC: test_cheat "NOS"
00DF: actor $PLAYER_ACTOR driving
else_jump @MAIN
03C0: $car = actor $PLAYER_ACTOR car
We're on the right way :iknowwhatyoudid:
Now we gotta put nitro on our car pffh:
Let's search on opcode list :
:motherofgod_ Nothing appeared. Let's search add nitro pffh:
YES! :somuchwin: Let's use it pffh:
Code:
09E9: car $car add_single_nitro
Code:
{$CLEO .cs}
thread "NOS!"
:MAIN
wait 0
if and
0ADC: test_cheat "NOS"
00DF: actor $PLAYER_ACTOR driving
else_jump @MAIN
03C0: $car = actor $PLAYER_ACTOR car
09E9: car $car add_single_nitro
jump @MAIN
Type NOS to add nitro always :forever_hurra: