[glow=red,2,300]---------------------------------------------------------------------------------------------------[/glow]
This Tutorial Is Fully By [glow=red,2,300]Mr.Ze[/glow] I'm Just Publishing it To Help Everybody. Mr.Ze Sent This To Me To Help me. And I Want To Help Everybody. I Don't Take Any Credit Of This.
[glow=red,2,300]---------------------------------------------------------------------------------------------------[/glow]
So, CLEO is a simple scripting lang.
The best way you will learn is by looking at the scripts and trying to understand what they do and how they do it.
Good example of a script:
{$CLEO .cs} - This means that when you compile a script, it will compile as a CLEO Script - .cs.
0000: NOP - This is like wait 0, but above the script and the label. It just needs to be there if there isn't anything else, otherwise it could crash.
wait 0 - this is how much time the script will wait until it proceeds further. If set to 0, it won't wait. BUT, you need to have wait 0 there because otherwise the scripts crash for some reason.
:INFINITE_RUN_23 - the label. Everything below it is considered part of it until there is an end, which is either END function or are JUMP.
IF AND
044B: actor $PLAYER_ACTOR on_foot
NOT Actor.Driving($PLAYER_ACTOR) - A condition. The condition needs to be fulfilled for script to either proceed or do something. So if player is on foot AND not driving it will do what it says next.
ELSE_JUMP @INFINITE_RUN_23 - This equals to ELSE -> if the condition is not fulfilled, it if it's false; if player is not on foot AND driving, then it will just go back to that label and whole process of checking will start again until player is on foot AND not driving. So the entire time while the script is not activated, it will be just repeating itself checking "Are you on foot, sir? Are you on foot, sir?" and will keep doing it like that.
Player.InfiniteRun($PLAYER_CHAR) = TRUE - Everything after ELSE_JUMP is what will happen if the condition is fulfilled -> it will set infinite run to true.
0393: actor $PLAYER_ACTOR perform_animation "SPRINT_CIVI" at 1.15 times_normal_rate - This means you will perform a "SPRING_CIVI" animation 1.15 times faster than normal, meaning you will run 1.15 times faster than normal.
JUMP @INFINITE_RUN_23 - This is like ELSE_JUMP except it comes at the end of the script. This will do the same effect -> it will go back to the label and whole process will start again just so the script knows when you are no longer on foot AND no longer driving so it can disable infinite run.
That's a simple thing explained in a simple way.
[glow=red,2,300]-Mr.Ze[/glow]
This Tutorial Is Fully By [glow=red,2,300]Mr.Ze[/glow] I'm Just Publishing it To Help Everybody. Mr.Ze Sent This To Me To Help me. And I Want To Help Everybody. I Don't Take Any Credit Of This.
[glow=red,2,300]---------------------------------------------------------------------------------------------------[/glow]
So, CLEO is a simple scripting lang.
The best way you will learn is by looking at the scripts and trying to understand what they do and how they do it.
Good example of a script:
Code:
{$CLEO .cs}
0000: NOP
:INFINITE_RUN_23
wait 0
IF AND
044B: actor $PLAYER_ACTOR on_foot
NOT Actor.Driving($PLAYER_ACTOR)
ELSE_JUMP @INFINITE_RUN_23
Player.InfiniteRun($PLAYER_CHAR) = TRUE
0393: actor $PLAYER_ACTOR perform_animation "SPRINT_CIVI" at 1.15 times_normal_rate
JUMP @INFINITE_RUN_23
{$CLEO .cs} - This means that when you compile a script, it will compile as a CLEO Script - .cs.
0000: NOP - This is like wait 0, but above the script and the label. It just needs to be there if there isn't anything else, otherwise it could crash.
wait 0 - this is how much time the script will wait until it proceeds further. If set to 0, it won't wait. BUT, you need to have wait 0 there because otherwise the scripts crash for some reason.
:INFINITE_RUN_23 - the label. Everything below it is considered part of it until there is an end, which is either END function or are JUMP.
IF AND
044B: actor $PLAYER_ACTOR on_foot
NOT Actor.Driving($PLAYER_ACTOR) - A condition. The condition needs to be fulfilled for script to either proceed or do something. So if player is on foot AND not driving it will do what it says next.
ELSE_JUMP @INFINITE_RUN_23 - This equals to ELSE -> if the condition is not fulfilled, it if it's false; if player is not on foot AND driving, then it will just go back to that label and whole process of checking will start again until player is on foot AND not driving. So the entire time while the script is not activated, it will be just repeating itself checking "Are you on foot, sir? Are you on foot, sir?" and will keep doing it like that.
Player.InfiniteRun($PLAYER_CHAR) = TRUE - Everything after ELSE_JUMP is what will happen if the condition is fulfilled -> it will set infinite run to true.
0393: actor $PLAYER_ACTOR perform_animation "SPRINT_CIVI" at 1.15 times_normal_rate - This means you will perform a "SPRING_CIVI" animation 1.15 times faster than normal, meaning you will run 1.15 times faster than normal.
JUMP @INFINITE_RUN_23 - This is like ELSE_JUMP except it comes at the end of the script. This will do the same effect -> it will go back to the label and whole process will start again just so the script knows when you are no longer on foot AND no longer driving so it can disable infinite run.
That's a simple thing explained in a simple way.
[glow=red,2,300]-Mr.Ze[/glow]