Quantcast

Jump to content

» «
Photo

How To Make A Cleo Files ?

48 replies to this topic
Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#1

Posted 05 March 2012 - 12:02 PM

Hi guys i have the code of cleo but i dont know how to make it .cs file any1 can ?


the code ::


CODE

:0
wait 0
if
0AB0:  key_pressed 48    //------ use '96' for numpad 0
jf @0
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
wait 193000
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
jump @0


and how i add mp4 to listen the calling > please replllllllllllllyyyy !! suicidal.gif suicidal.gif

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#2

Posted 05 March 2012 - 02:40 PM

just use {$cleo} at the top & compile,
CODE

{$cleo .cs}
thread 'Ashwin'      // you can use NOP also

:0
wait 0
if
0AB0:  key_pressed 48    //------ use '96' for numpad 0
jf @0
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
wait 193000
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
jump @0

press F6 to compile, & SB will create a .cs file,

Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#3

Posted 05 March 2012 - 03:22 PM

thanks alooot but where i put the mp3 ? confused.gif

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#4

Posted 05 March 2012 - 03:40 PM

put .mp3 file where ever you want,
then load & use it like this,
i am not sure but may be this works!
CODE

{$cleo .cs}
thread 'Ashwin'
0AAC: 0@ = load_mp3 "audio\Phone.mp3"   //<-- the address of your mp3 file

:0
wait 0
if
0AB0:  key_pressed 48
jf @0
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
0AAD: set_mp3 0@ perform_action 1   //<--------------- i hope this opcode plays the mp3 file
0AAF: 1@ = get_mp3_length 0@
wait 1@   //<--------- if you use this then you don't have to calculate for length
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
jump @0


good luck!

Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#5

Posted 05 March 2012 - 04:44 PM Edited by Police Media, 05 March 2012 - 04:46 PM.

the mp3 in cleo > mp3

so its will be like this?


CODE

{$cleo .cs}
thread 'Ashwin'
0AAC: 0@ = load_mp3 "cleo\mp3\1.mp3"  //<-- the address of your mp3 file

:0
wait 0
if
0AB0:  key_pressed 48
jf @0
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
0AAD: set_mp3 0@ perform_action 1   //<--------------- i hope this opcode plays the mp3 file
0AAF: 1@ = get_mp3_length 0@
wait 1@   //<--------- if you use this then you don't have to calculate for length
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
jump @0



and the phone not showing up in the game nervous.gif

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#6

Posted 05 March 2012 - 04:58 PM Edited by Ashwin the new boy, 06 March 2012 - 11:58 AM.

yes!
load model 330 before it,
#CELLPHONE
i thought you know how to load models,
but na..
i hope you know how to get the address of any file,,,

CODE

{$cleo .cs}
thread 'Ashwin'
0AAC: 0@ = load_mp3 "phone.mp3"  //<-- the address of your mp3 file should be in " "
model.load(330)
038B: load_requested_models

:0
wait 0
if and
model.available(330)
0AB0:  key_pressed 48
jf @0
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
0AAD: set_mp3 0@ perform_action 1
0AAF: 1@ = get_mp3_length 0@
wait 1@
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
jump @0

Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#7

Posted 05 March 2012 - 05:32 PM

i cant understand you >>>

how to load it ?

and i try it the mp3 not working

Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#8

Posted 06 March 2012 - 11:31 AM

reply please sad.gif

Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#9

Posted 07 March 2012 - 03:24 PM

moto_whistle.gif

Michael.Knight1
  • Michael.Knight1

    Knight Rider

  • BUSTED!
  • Joined: 15 Dec 2011

#10

Posted 07 March 2012 - 04:54 PM Edited by Michael.Knight1, 07 March 2012 - 04:56 PM.

QUOTE (Police Media @ Wednesday, Mar 7 2012, 15:24)
moto_whistle.gif

USE 0729 To Play and Stop biggrin.gif
CODE
perform_action 1
To Start use 1 or 2 or 3 to load Repeatedly
CODE
perform_action 0
To Stop Use 0

That's My Own Script

CODE

{$CLEO .cs}
thread 'Michael'
0AAC: 0@ = load_audiostream "CLEO\playlist\PHONE1.mp3"
0AAC: 1@ = load_audiostream "CLEO\playlist\PHONE2.mp3"
Model.Load(#CELLPHONE)

:Michael_10
0001: wait 0 ms
00D6: if
0256:   player $PLAYER_CHAR defined
jf @Michael_10
if
 $ONMISSION == 0
jf @Michael_10
0001: wait 0 ms
if and
0AB0:  key_pressed 50 // Press 1 in your keyboard
jf @Michael_10

:Michael_211
0001: wait 0 ms
if and
  Model.Available(#CELLPHONE)
jf @Michael_211
0AAD: set_audiostream 1@ perform_action 1
0001: wait 100 ms
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
0AAD: set_audiostream 1@ perform_action 0
0001: wait 100 ms
0AAD: set_audiostream 2@ perform_action 1
wait 5000
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
jump @Michael_10


man what's you from confused.gif

Joni2030
  • Joni2030

    Prankster

  • Members
  • Joined: 06 Jul 2011

#11

Posted 07 March 2012 - 05:37 PM

Always before I start coding I put these to SB {$VERSION 3.1.0027}
{$CLEO .cs}


//-------------MAIN---------------- every time after that I start coding but this is my way

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#12

Posted 07 March 2012 - 05:50 PM Edited by The_Sorrow, 07 March 2012 - 05:52 PM.

QUOTE (Joni2030 @ Wednesday, Mar 7 2012, 17:37)
Always before I start coding I put these to SB {$VERSION 3.1.0027}
{$CLEO .cs}


//-------------MAIN---------------- every time after that I start coding but this is my way

If anybody is wanting to create a CLEO file (.cs) they must start there script with:

CODE
{$CLEO}


It is mandatory.

EDIT: Please, Police Media Don't double post, use the edit button instead

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#13

Posted 08 March 2012 - 08:41 AM Edited by Ashwin the new boy, 08 March 2012 - 08:51 AM.

{$VERSION} is not necessary & used in decompiling purpose only!
it's is to know what is the version of our .ini by which we have decompiled the script,
so,
you can start scripting after putting {$cleo} at head,
{$CLEO} is to tell it is cleo,
we can use it like
{$CLEO .cs} , {$CLEO .cm} , etc. to compile our script in different extension,
otherwise SB will compile only in .scm

@joni
all the text start with " // ' are for comments or massage only,
they are not used for compiling,

@M.K1
QUOTE
man what's you from

do you want to say
Where are you from ?

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#14

Posted 08 March 2012 - 09:16 AM Edited by The_Sorrow, 08 March 2012 - 09:32 AM.

QUOTE (Ashwin the new boy @ Thursday, Mar 8 2012, 08:41)
{$CLEO} is to tell it is cleo,
we can use it like
{$CLEO .cs} , {$CLEO .cm} , etc. to compile our script in different extension,
otherwise SB will compile only in .scm

Ashwin , remember that {$CLEO.cm} is only to be used for custom missions in San Andreas, It isn't actually an extension for a newly made script.

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#15

Posted 08 March 2012 - 11:27 AM

And if you've already compiled without the {$CLEO} directive, you've overwritten your main.scm and script.img and your game will probably fail to run until you restore the originals.

Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#16

Posted 08 March 2012 - 12:31 PM

so ? witch 1 i use please give me a right code

my mp3 in cleo>mp3>1.mp3

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#17

Posted 08 March 2012 - 12:37 PM

Use Michael.Knight1's code that he provided just change the location of the sound files

So:

CODE
0AAC: 1@ = load_audiostream "CLEO\playlist\PHONE2.mp3"


Would be:

CODE
0AAC: 1@ = load_audiostream "CLEO\MP3\1.mp3"


Etc. Etc.

Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#18

Posted 08 March 2012 - 02:37 PM

whats the code for num0 because i wont delete my WeatherMenu.cs ^_^

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#19

Posted 08 March 2012 - 03:34 PM

QUOTE
remember that {$CLEO.cm} is only to be used for custom missions in San Andreas,

oh! Really ?
Actually I join today!

@P Media
Do you want this ?
0 (numpad with Num Lock on) = 96
use it as
CODE

0AB0:  key_pressed 96

for more press 'F12' while using SB & open cleo 3 code library,

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#20

Posted 08 March 2012 - 03:34 PM Edited by The_Sorrow, 08 March 2012 - 03:37 PM.

QUOTE (Police Media @ Thursday, Mar 8 2012, 14:37)
whats the code for num0 because i wont delete my WeatherMenu.cs ^_^

So you want to press number 0 on your keyboard instead of 1?

Use this:

CODE
{$CLEO .cs}
thread 'Michael'
0AAC: 0@ = load_audiostream "CLEO\playlist\PHONE1.mp3"
0AAC: 1@ = load_audiostream "CLEO\playlist\PHONE2.mp3"
Model.Load(#CELLPHONE)

:Michael_10
0001: wait 0 ms
00D6: if
0256:   player $PLAYER_CHAR defined
jf @Michael_10
if
$ONMISSION == 0
jf @Michael_10
0001: wait 0 ms
if and
0AB0:  key_pressed 48 //Press 0 in your keyboard
jf @Michael_10

:Michael_211
0001: wait 0 ms
if and
 Model.Available(#CELLPHONE)
jf @Michael_211
0AAD: set_audiostream 1@ perform_action 1
0001: wait 100 ms
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
0AAD: set_audiostream 1@ perform_action 0
0001: wait 100 ms
0AAD: set_audiostream 2@ perform_action 1
wait 5000
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
jump @Michael_10


Don't forget to change your sound files location

QUOTE
oh! Really ?
Actually I join today!


Yep, it is true

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#21

Posted 08 March 2012 - 03:50 PM

@sorrow
thanks for make me correct,
because i was reading "Joined: Nov 14, 2010" near my Avatar by mistake, ha ha
anyway,
Why don't you use if and instead of using so much conditions ?

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#22

Posted 08 March 2012 - 03:52 PM Edited by The_Sorrow, 08 March 2012 - 03:54 PM.

QUOTE (Ashwin the new boy @ Thursday, Mar 8 2012, 15:50)
@sorrow
thanks for make me correct,
because i was reading "Joined: Nov 14, 2010" near my Avatar by mistake, ha ha
anyway,
Why don't you use if and instead of using so much conditions ?

Its fine, I wasn't writing the script from scratch, If the code already works and a small change is needed I wasn't going to mess with it anymore

Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#23

Posted 08 March 2012 - 04:35 PM

The_Sorrow


your code not working




Ashwin the new boy


your code working without sounds xD

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#24

Posted 08 March 2012 - 04:41 PM Edited by The_Sorrow, 08 March 2012 - 05:40 PM.

This code should work now, just make sure to correctly define your MP3 file location!

CODE
{$CLEO}
0000:

0AAC: 0@ = load_audiostream "CLEO\playlist\01.mp3"
model.load(330)
038B: load_requested_models

:0
wait 0
if and
model.available(330)
0AB0:  key_pressed 0x30 // Press 0 on your keyboard
jf @0
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
0AAD: set_mp3 0@ perform_action 1
0AAF: 1@ = get_mp3_length 0@
wait 1@
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
jump @0

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#25

Posted 08 March 2012 - 04:44 PM

you may put the file in root dir & just write the name of mp3 file,

Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#26

Posted 08 March 2012 - 05:07 PM

works but only 5 secs calling !

i need it 3 minutes and 13 secounds

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#27

Posted 08 March 2012 - 05:11 PM

QUOTE (Police Media @ Thursday, Mar 8 2012, 17:07)
works but only 5 secs calling !

i need it 3 minutes and 13 secounds

My code?

Thats because the sound file is only 5 seconds long.

Police Media
  • Police Media

    Police Ritor

  • Members
  • Joined: 29 Feb 2012

#28

Posted 08 March 2012 - 05:33 PM

no , the sound still on but the phone only 5 secs

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci Racing
  • Joined: 30 Jan 2011
  • Brazil

#29

Posted 08 March 2012 - 05:39 PM

get_mp3_length returns seconds, the wait wants miliseconds.

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#30

Posted 08 March 2012 - 05:39 PM

QUOTE (Police Media @ Thursday, Mar 8 2012, 17:33)
no , the sound still on but the phone only 5 secs

CODE
{$CLEO}
0000:

0AAC: 0@ = load_audiostream "CLEO\playlist\01.mp3"
model.load(330)
038B: load_requested_models

:0
wait 0
if and
model.available(330)
0AB0:  key_pressed 0x30 // Press 0 on your keyboard
jf @0
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
0AAD: set_mp3 0@ perform_action 1
0AAF: 1@ = get_mp3_length 0@
wait 187800 <- 3 minutes and 13 seconds
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
jump @0


How about now?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users